3D surface plot (mode shape)

25 次查看(过去 30 天)
Lane Schnell
Lane Schnell 2019-9-20
Hi,
Im looking to make a 3d surface plot. x and y in my code represnt grid points. R16 and R109 is the data I want to be in the Z direction. Im horrible at coding so any help I can get is appreciated.
x=[0, 12.5, 25.5, 38, 50.5;
0, 12.5, 25.5 , 38, 50.5;
0, 12.5, 25.5, 38, 50.5];
y=[0, 0, 0, 0, 0;
6, 6, 6, 5, 4.75;
18, 17, 15.75, 14, 13];
R16=[1, 1.571429, 2.285714, 2.714286, 3.428571;
.857143, 1.428571, 2.142857, 2.857143, 3.571429;
1.142857, 1.571429, 2.285714, 3, 5];
R109=[4, 4.315789, 3.55556, 2.857143, 2.1;
3.7777778, 12.42857, 3, .75, 4.444444;
1.684211, 1.947368, 7, 3.888889, 12.5];
[X,Y,Z] = meshgrid(x,y,R16);
surf(X,Y,Z)

回答(1 个)

Bruno Luong
Bruno Luong 2019-9-21
No MESHGRID calls are needed since your data are already gridded
surf(x,y,R16)
and
surf(x,y,R109)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by