welcome to HCM,
you had normal erection and also sperm discharge during masturbation
then it shows that your sexula function would be normal.
if you meet to your partner and erection not occurred might be due to shyness or fear which happen usually in first meeting. If it happens repeatedly then consult to your nearest doctor.
For more inquiry you may ask on firstname.lastname@example.org
have a happy married life