Plot graph using line command

1 次查看(过去 30 天)
Hi all,
I would like to know what returns the command line. For example, I have this line.
h = line([x],[y],'color','r');
Where x and y are arrays of double values. These are the values:
x =
0.3211 0.3906 0.4581 0.5233 0.5860 0.6461 0.7033 0.7576
y =
0.4400 0.5400 0.6400 0.7400 0.8400 0.9400 1.0400 1.1400
I want to plot "h" but it shows nothing.
Somebody can tell me how to generate and use "h" as a line. For example, I want to use this "h" to do intersections with other lines.
Thanks a lot.
Raúl.

采纳的回答

Walter Roberson
Walter Roberson 2013-3-25
The return value from line() is the handle graphics "handle" that represents the drawn line segment and its properties. The drawn line would already be present in your figure.
line() is not a data structure for representing lines for general manipulations such as finding intersections with other lines. line() is a graphics call.
  4 个评论
Raúl
Raúl 2013-3-25
I would like to get the value in 'y' when two lines are intersected
Walter Roberson
Walter Roberson 2013-3-25
You opened a new Question about that; I answered there.

请先登录,再进行评论。

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by