MATLAB: Help plotting two lines on same graph

plot

Hi, I want to plot these two lines on the same graph:
plot((1/2)*[pl(1),pr(1)], (1/2)*[pl(1),pr(1)]);
plot([pr(1),(1/2)*pr(1)], [pl(2), (1/2)*pr(1)]);
Where pr=[0;0]
and pl=[1;0]
Any help would be greatly appreciated, Thanks

Best Answer

Call "hold on" after the first plot. Also, you could use the "line" function instead of "plot" here if you like.
Related Question