Having trouble plotting 3D data

1 visualizzazione (ultimi 30 giorni)
Tawheed Uddin
Tawheed Uddin il 2 Dic 2021
hi i am having trouble plotting this 3d graph. this is the data i was using and the code
X=[0.50 2.70 1.80 1.45 1.35 1.13 0.96 1.49 1.72 0.80 1.03 1.19 0.75 1.03 1.20 1.31 1.52 2.15 2.22 2.30 2.42 2.50 2.62 2.68 1.79 1.97 1.78]';
Y=[0.240 3.500 1.950 1.800 1.600 1.300 0.900 2.170 2.330 0.980 1.170 1.370 1.120 1.330 1.500 1.640 1.800 0.850 1.0 0.8 0.7 0.9 0.9 0.8 0.8 1.1 1.1]';
Z=[342.8880559 1361.877793 1012.830906 923.1590142 871.7488789 774.2139069 656.8934189 981.1561986 1050.146934 636.0585104 728.1907481 799.5898076 645.9988011 755.886652 823.2101723 869.3645606 937.4594935 794.5434106 853.1103438 778.2601977 727.3768847 839.8072314 859.4947972 823.6481171 744.4141472 862.0806767 839.9441428]';
Z=[X Y Z];
surf(Z);shading('interp');
xlabel('X');ylabel('Y');zlabel('Z');
However, this is the graph i get
i do not know what i have doen wrong. any help would be greatly appreciated.
thanks.

Risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by