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?
You can use refline and then edit the XData and YData properties to create a vertical line.