3D surface plot (mode shape)

조회 수: 26 (최근 30일)
Lane Schnell
Lane Schnell 2019년 9월 20일
답변: Bruno Luong 2019년 9월 21일
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