please ,write a code to 3D plot this file .

3 ビュー (過去 30 日間)
Ali Moosazadeh
Ali Moosazadeh 2025 年 2 月 8 日
コメント済み: Ali Moosazadeh 2025 年 2 月 9 日
column 1,2,3 are x,y,z respectively. please write the code . thanks

回答 (2 件)

Sam Chak
Sam Chak 2025 年 2 月 8 日
I am unsure about the specific type of 3D plot you require. I reviewed your previous questions and found that you have already learned how to extract the data. Once you have the coordinates, you need determine the type of 3D plot for them.
data= readmatrix('scd.xlsx');
x = data(:,1);
y = data(:,2);
z = data(:,3);
scatter3(x, y, z) % <-- probably this line is new to you
  1 件のコメント
Ali Moosazadeh
Ali Moosazadeh 2025 年 2 月 8 日
can you write the code using surf function ?

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


Torsten
Torsten 2025 年 2 月 8 日
移動済み: Image Analyst 2025 年 2 月 8 日
data= readmatrix('scd.xlsx');
x = data(:,1);
y = data(:,2);
z = data(:,3);
F = scatteredInterpolant(x,y,z);
xq = linspace(min(x),max(x),100);
yq = linspace(min(y),max(y),100);
[Xq,Yq] = meshgrid(xq,yq);
Zq = F(Xq,Yq);
surf(Xq,Yq,Zq)
colorbar

カテゴリ

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