Plot figure with 3 matrix 1D x y z like a surface

조회 수: 6 (최근 30일)
ly
ly 2015년 10월 22일
댓글: ly 2015년 10월 22일
Three matrices are x y z coordinates for a figure.
... x=[1:10]
y=[11:20]
z=[21:30] ...
Which command can be used to plot surface with x y z? (Tried "surf" and "mesh" command but they are not working)
  댓글 수: 4
Walter Roberson
Walter Roberson 2015년 10월 22일
You have only shown one combination. Should it always be the triples x(K), y(K), z(K), like x(1), y(1), z(1); x(2), y(2), z(2)? If so then you are defining a line, not a surface.
Or can you have x(1), y(3), z(5) for example, all combinations of all x values with all y values with all z values? If that is the case then you are defining a volume rather than a surface.
ly
ly 2015년 10월 22일
Ok! I got it.
Thanks!

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2015년 10월 22일
plot3(x, y, z)
This is the surface plot you seem to be requesting. It is a degenerate surface.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by