フィルターのクリア

I need help with the plotting 3D surface.

1 回表示 (過去 30 日間)
Phung Minh
Phung Minh 2023 年 2 月 13 日
コメント済み: Phung Minh 2023 年 2 月 13 日
Hi everyone,
I need help with the plotting 3D surface.
I have a matrix as follows:
Data1=
[6 100 41.36
6 150 39.26
6 200 37.63
7 100 54.22
7 150 52.26
7 200 50.11
8 100 61.18
8 150 59.38
8 200 55.33];
I would like to show the 3D like the attached figure.
where P corresponds to column 1 of the matrix;
L corresponds to column 2 of the matrix;
and Rz corresponds to column 3 of the matrix;
Thank you so much!

回答 (1 件)

Dyuman Joshi
Dyuman Joshi 2023 年 2 月 13 日
編集済み: Dyuman Joshi 2023 年 2 月 13 日
Data=[6 100 41.36
6 150 39.26
6 200 37.63
7 100 54.22
7 150 52.26
7 200 50.11
8 100 61.18
8 150 59.38
8 200 55.33];
x = Data(:,1);
y = Data(:,2);
z = Data(:,3);
xi = unique(x);
yi = unique(y);
[X,Y] = meshgrid(xi,yi);
Z = reshape(z,size(X));
%adjust color accordingly
C(:,:,1)=57*ones(size(Z))/255;
C(:,:,2)=255*ones(size(Z))/255;
C(:,:,3)=20*ones(size(Z))/255;
surf(X,Y,Z,C)
  3 件のコメント
Torsten
Torsten 2023 年 2 月 13 日
Can you draw a finer mesh?
It only makes sense if you supply more points.
Phung Minh
Phung Minh 2023 年 2 月 13 日
Yes, thank you so much!

サインインしてコメントする。

カテゴリ

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