Two line start at same point

7 次查看(过去 30 天)
m
m 2014-3-12
回答: m 2014-3-12
Hi all,
i'm newbie in matlab. My question is, i have x and y line with range from 0 to 5. i want to plot at thre coordinate. first(1,1), second(2,3) and third(3,2). how can i plot two line with the same starting point at (1,1). and both line is visible.
thank you.

回答(2 个)

Walter Roberson
Walter Roberson 2014-3-12
plot([1 2], [1 3], 'r', [1 3], [1 2], 'g')

m
m 2014-3-12
what if i want to set the x and y axis to let say, 0-10 and the first point is on the coordinate is at 1,1
thanks

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by