Drawing 3 D for 3 data sets

6 ビュー (過去 30 日間)
Asma A Bder Muhmed
Asma A Bder Muhmed 2020 年 9 月 11 日
回答済み: Ameer Hamza 2020 年 9 月 12 日
How I can draw 3D for the data below to have as in tha attached photo
X = [65 70 75 80 85 90 95 100];
Y = [36 38 40 42 44 46 50 54];
Z = [1792.373894 1178.621038 685.7078009 416.4883705 365.9043439 450.2110549 700.8830089 1040.358032];
  2 件のコメント
KSSV
KSSV 2020 年 9 月 11 日
With the given data you cannot plot as shown in the atatched image.
Asma A Bder Muhmed
Asma A Bder Muhmed 2020 年 9 月 11 日
Do u know what is the altranative way?

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

採用された回答

KSSV
KSSV 2020 年 9 月 11 日
Whay you get is this:
X = [65 70 75 80 85 90 95 100];
Y = [36 38 40 42 44 46 50 54];
Z = [1792.373894 1178.621038 685.7078009 416.4883705 365.9043439 450.2110549 700.8830089 1040.358032];
m = numel(X) ;
Z = repmat(Z,m,1) ;
surf(X,Y,Z)
  1 件のコメント
Asma A Bder Muhmed
Asma A Bder Muhmed 2020 年 9 月 11 日
Thank you but that what I got

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

その他の回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 9 月 12 日
Try something like this
X = [65 70 75 80 85 90 95 100];
Y = [36 38 40 42 44 46 50 54];
Z = [1792.373894 1178.621038 685.7078009 416.4883705 365.9043439 450.2110549 700.8830089 1040.358032];
xv = linspace(min(X), max(X), 100);
yv = linspace(min(Y), max(Y), 100);
[xg, yg] = meshgrid(xv, yv);
zg = griddata(X, Y, Z, xg, yg);
mesh(xg, yg, zg);

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by