How to convert from surf to plot3 ?

조회 수: 5 (최근 30일)
Tin Truong Chanh
Tin Truong Chanh 2021년 4월 5일
댓글: darova 2021년 4월 6일
Hello!
I have data with X(1xn), Y(1xn), and Z(nxn) matrix, with this data i can plot with surf . However, i would like to plot with plot3 with this data. How can i do that!.

채택된 답변

darova
darova 2021년 4월 5일
Try meshgrid
[X1,Y1] = meshgrid(X,Y);
plot3(X1,Y1,Z1)
line(X1',Y1',Z1')
  댓글 수: 2
Tin Truong Chanh
Tin Truong Chanh 2021년 4월 6일
Your code works well. Thank you so much for your help!.
darova
darova 2021년 4월 6일
you are welcome

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

추가 답변 (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