If you want to see the effect of line drawing, you can use plot inside the for tag, that data is a * 2 matrix containing "x, y" of "n" points
clf(figure(3)) for i = 1 : length(data)-1 plot([data(i,1),data(i+1,1)], [data(i,2),data(i+1,2)], '-*'); hold on end hold off
Or you can use this operator to draw it in one step.
plot(data(:,1), data(:,2), '-*');
Misaki
source share