habla
habla

Reputation: 3

How can I join points with line in MATLAB

I've 4 points. I want to join first two of the with a line and then second two with another line My desired picture is given below

Plots

I can draw the first graph with maker. but but I want to join these points.

Upvotes: 0

Views: 878

Answers (1)

Mark Snyder
Mark Snyder

Reputation: 1655

You can plot them by listing the various different lines in (X,Y) sets one after another in one use of plot.

plot([a(1) a(2)],[b(1) b(2)],[a(3) a(4)],[b(3) b(4)])

Upvotes: 2

Related Questions