In addition, when research has shown a nutrient such as zinc or niacin to improve sexual function, it's usually in people who are deficient in it. So, before you stock up on over-the-counter nutritional supplements for ED, speak with your doctor. He can test you for deficiencies and steer you toward the most effective and safest way to treat your erectile dysfunction.
A common and important cause of ED is vasculogenic. Many men with ED have comorbid conditions such as hyperlipidemia, hypercholesterolemia, tobacco abuse, diabetes mellitus, or coronary artery disease (CAD).  The Princeton III Consensus recommends screening men who present with ED for cardiovascular risk factors; ED may be the earliest presentation of atherosclerosis and vascular disease. 
ED can also occur as a side effect of some medications, for example some high blood pressure medications such as certain diuretics and beta blockers. If you think that a medication you are taking has a negative effect on your sex life, you should discuss this with your prescribing doctor. Your doctor may be able to recommend an alternative treatment.
A physical exam checks your total health. Examination focusing on your genitals (penis and testicles) is often done to check for ED. Based on your age and risk factors, the exam may also focus on your heart and blood system: heart, peripheral pulses and blood pressure. Based on your age and family history your doctor may do a rectal exam to check the prostate. These tests are not painful. Most patients do not need a lot of testing before starting treatment.