

Plotting coordinates
I have a 100x4 matrix with coordinates for 100 lines that I'd like to plot in a single plot.
Each row has the data for a single line stored as follows:
[x1, y1, x2, y2]
how can I plot all the lines?
Thank you!
Scilab


If the matrix name is A, you can use plot(A(:,1),A(:,2),A(:,3),A(:,4)). This will display connected line segments. If you want individual points to be displayed, you can use plot(A(:,1),A(:,2),'+',A(:,3),A(:,4),'+'). To know more plot options, please refer to this page- https://help.scilab.org/docs/5.5.2/en_US/plot.html
Login to add comment