MATLAB: I have a question about plot. Plesase help me.

MATLABplot

I want to draw a line x = a perpendicular to the x axis in matlab. How do I do ? (with a = constant) value y from 3 to 5.

Best Answer

s=get(gca,'ylim')
hold on;
plot([a a],s)