Draw 3 D from 4 data sets
古いコメントを表示
How I can draw 3 D from the these data to get graph as atteched?
x1 = [60 65 70 75 80 85 90 95]
y 1= [717.7443511 450.2110549 315.3203173 281.0355881 310.2619146 367.5904781 425.4810863 466.5103523]
x2 = [32 34 36 38 40 42 44]
y2 = [2461.769179 2698.95206 2893.41954 2863.069124 2539.331353 1964.921629 1246.066407]
4 件のコメント
KSSV
2020 年 8 月 4 日
With the given data it is not possible to get the plots shown as attached.
Cris LaPierre
2020 年 8 月 4 日
You either need to pick 3 of the 4, or provide an equation for Z based on the values of X and Y.
Asma A Bder Muhmed
2020 年 8 月 4 日
Asma A Bder Muhmed
2020 年 8 月 4 日
回答 (1 件)
Ghufran Aldawood
2020 年 8 月 4 日
0 投票
9 件のコメント
Asma A Bder Muhmed
2020 年 8 月 4 日
Ghufran Aldawood
2020 年 8 月 5 日
PL = [15.0 20.0 25.0 30.0 35.0 40.0 45.0];
UCS = [9467.7 5552.5 2276.9 535.1 476.1 671.1 128.2];
LL = [50.0 60.0 70.0 80.0 90.0 100.0 110.0];
figure(1)
stem3(PL, UCS, LL)
grid on
PL2 = linspace(min(PL), max(PL), 20);
UCS2 = linspace(min(UCS), max(UCS), 20);
[X,Y] = meshgrid(PL2, UCS2);
Z = griddata(PL,UCS,LL,X,Y);
figure(2)
surf(X, Y, Z);
grid on
set(gca, 'ZLim',[0 100])
shading interp
Asma A Bder Muhmed
2020 年 8 月 5 日
Ghufran Aldawood
2020 年 8 月 6 日
You can't graph in 3D with 4 data sets.
Asma A Bder Muhmed
2020 年 8 月 6 日
Ghufran Aldawood
2020 年 8 月 6 日
You have UCS 1 which is one variable, and UCS 2 which is a second variable. It does not matter that they have the same name. For example, here are 3 variables:
X1 = 1,5,10,15,20
X2 = 1,2,3,4,5
X3 = 2,4,6,8,10
The figure:

The code:
X1 = [1 5 10 15 20];
X2 = [1 2 3 4 5];
X3 = [2 4 6 8 10];
plot3(X1,X2,X3);
Asma A Bder Muhmed
2020 年 8 月 6 日
Ghufran Aldawood
2020 年 8 月 6 日
Glad I can help. Good luck!
Asma A Bder Muhmed
2020 年 8 月 6 日
カテゴリ
ヘルプ センター および File Exchange で Graphics Object Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!