Question

By using Sci-lab I need to draw triangle cicrle and rectangular (separately, of course). the most difficult for me is triangle, I have no idea how to plot them

Was it helpful?

Solution

Plotting is rather trivial. See the plot command reference.

There are shorter ways, but for easiest understanding just plot the three sides as three lines.

For instance if you have a triangle with the corner coordinates at (x,y) = [0,0],[5,10],[10,0]. Plot three lines between these points.

plot([0,5],[0,10])
plot([5,10],[10,0])
plot([0,10],[0,0])
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top