Sexual dysfunction is highly prevalent in men and women. In the MMAS, 52% of the respondents reported some degree of erectile difficulty. Complete ED, defined as (1) the total inability to obtain or maintain an erection during sexual stimulation and (2) the absence of nocturnal erections, occurred in 10% of the respondents. Mild and moderate ED occurred in 17% and 25% of responders, respectively. 
Erectile dysfunction (ED) affects 50% of men older than 40 years,  exerting substantial effects on quality of life.  This common problem is complex and involves multiple pathways. Penile erections are produced by an integration of physiologic processes involving the central nervous, peripheral nervous, hormonal, and vascular systems. Any abnormality in these systems, whether from medication or disease, has a significant impact on the ability to develop and sustain an erection, ejaculate, and experience orgasm.
Vascular damage may result from radiation therapy to the pelvis and prostate in the treatment of prostate cancer.  Both the blood vessels and the nerves to the penis may be affected. Radiation damage to the crura of the penis, which are highly susceptible to radiation damage, can induce ED. Data indicate that 50% of men undergoing radiation therapy lose erectile function within 5 years after completing therapy; fortunately, some respond to one of the PDE5 inhibitors.
Following a detailed discussion about the history of erectile dysfunction and its risk factors, your doctor will examine the testicles and penis to help determine the cause of erectile dysfunction. Your doctor will check reflexes and pulses in the area to see if problems with blood vessels or nerves are contributing to the erectile dysfunction. If necessary, your doctor will order tests to help diagnose erectile dysfunction.
medicines called alpha-blockers such as Hytrin (terazosin HCl), Flomax (tamsulosin HCl), Cardura (doxazosin mesylate), Minipress (prazosin HCl), Uroxatral (alfuzosin HCl), Jalyn (dutasteride and tamsulosin HCl), or Rapaflo (silodosin). Alpha-blockers are sometimes prescribed for prostate problems or high blood pressure. In some patients, the use of Sildenafil with alpha-blockers can lead to a drop in blood pressure or to fainting
Nerves originating in the spinal cord and peripheral ganglia innervate the penis. There are autonomic (parasympathetic and sympathetic), and somatic separate and integrated pathways. The autonomic pathways neurons originate in the spinal cord and peripheral ganglia from the sympathetic and parasympathetic systems, respectively. They merge to form the cavernous nerves that travel alongside the prostate, enter the corpora cavernosa and corpus spongiosum to affect the neurovascular events required for tumescence and detumescence. The somatic nerves send sensory information from the penile skin, glans, and urethra via the dorsal penile nerve and pudendal nerve to the spinal cord. The somatic nerves also initiate contraction of the ischio- and bulbocavernosus muscles.
A CVA can occur anywhere through the brain, midbrain, brainstem and spinal cord leading to varying degrees of SD depending on location. A decline in libido, erection and ejaculation are frequent in men who have had a CVA, with a reported prevalence of ED that varies from 17% to 48% (28,29). Right hemispheric infarcts seem to affect erections more so than left-sided ones. The exact effects of CVA on sexual function are complex and multifactorial, as disability, psychological and emotional status can affect sexual function aside from the location of the CVA.
Something else to consider is your porn use. If you are masturbating to very stimulating porn on a regular basis then it might be difficult to get as aroused in the bedroom with your partner. Watching video pornography is very stimulating and often men have difficulty creating that same level of arousal or stimulation with their partners. Consider masturbating without technology as visual images in your head are less stimulating then watching something live. Try this for two weeks and see if your erection quality improves.
When lifestyle changes alone don’t work, drug therapy (Viagra®, Cialis®, Levitra®, etc.) is normally the next step. Most of these medications work similarly to enhance a natural chemical in your body that relaxes the muscles in your penis. The goal of this medication is to increase your response to sexual stimulation by increasing the blood flow in your penis allowing you to get an erection.22
Of the drugs used for depression, tricyclic antidepressants may be associated with erectile problems and other drugs may be substituted to prevent this complication. Currently available substitutes include bupropion, nefazodone, and trazodone. The selective serotonin reuptake inhibitors (eg, fluoxetine, sertraline, paroxetine, citalopram) can also cause difficulties with ED, but they might also have other significant sexual side effects, including decreased libido and anorgasmia.
Erectile dysfunction is the inability to develop or maintain an erection that is rigid enough to allow penetration of the vagina, and therefore functional sexual intercourse. Generally, the term erectile dysfunction is applied if this occurs frequently (75% of the time) over a significant period if time (several weeks to months). If this is the case, the term impotence may also be used.
The mechanisms by which testosterone plays a role in erectile function are not completely understood. A study evaluating the effect of testosterone on erections in surgically castrated rabbits and control animals, in which the rabbits’ intracavernosal pressures were compared after cavernosal nerve stimulation, determined that castrated rabbits had much lower pressures after stimulation than control rabbits did.  Notably, the pressures increased when castrated rabbits received exogenous testosterone replacement.
There are two kinds of surgery for ED: one involves implantation of a penile prosthesis; the other attempts vascular reconstruction. Expert opinion about surgical implants has changed during recent years; today, surgery is no longer so widely recommended. There are many less-invasive and less-expensive options, and surgery should be considered only as a last resort.
Alprostadil self-injection. With this method, you use a fine needle to inject alprostadil (Caverject Impulse, Edex) into the base or side of your penis. In some cases, medications generally used for other conditions are used for penile injections on their own or in combination. Examples include papaverine, alprostadil and phentolamine. Often these combination medications are known as bimix (if two medications are included) or trimix (if three are included).
Begot, I., Peixoto, T. C. A., Gonzaga, L. R. A., Bolzan, D. W., Papa, V., Carvalho, A. C. C., ... & Guizilini, S. (2015, March 1). A Home-Based Walking Program Improves Erectile Dysfunction in Men With an Acute Myocardial Infarction. The American Journal of Cardiology, 115(5), 5741-575. Retrieved from http://www.ajconline.org/article/S0002-9149(14)02270-X/abstract
The link between chronic disease and ED is most striking for diabetes. Men who have diabetes are two to three times more likely to have erectile dysfunction than men who do not have diabetes. Among men with erectile dysfunction, those with diabetes may experience the problem as much as 10 to 15 years earlier than men without diabetes. Yet evidence shows that good blood sugar control can minimize this risk. Other conditions that may cause ED include cardiovascular disease, atherosclerosis (hardening of the arteries), kidney disease, and multiple sclerosis. These illnesses can impair blood flow or nerve impulses throughout the body.