How do I draw a vertical refline in matlab? e.g. I want to plot a line of x=5. Obviously using inf does not help at all. Can anyone give some advice?
Since MATLAB R2018b there is xline for this purpose:
xline(0)
draws a vertical line at x==0.
x==0