Plot graph using line command

조회 수: 1 (최근 30일)
Raúl
Raúl 2013년 3월 25일
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