I have two matrices x and y with 1×5 order. The x matrix gives x co-ordinates and y matrix gives y co-ordinates for points in the plot. So I have a set of 5 points on the graph. How do I connect these points on the graph? I have used for loop and lines equation
for i=1:5
line([x(i),y(i)], [x(i+1),y(i+1)],'LineStyle', '-');
end
but this is not giving me the correct lines. Can you please help?
Best Answer