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 Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by