Plot graph using line command

1 Ansicht (letzte 30 Tage)
Raúl
Raúl am 25 Mär. 2013
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Mär. 2013
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 Kommentare
Raúl
Raúl am 25 Mär. 2013
I would like to get the value in 'y' when two lines are intersected
Walter Roberson
Walter Roberson am 25 Mär. 2013
You opened a new Question about that; I answered there.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by