plot surface 3d from table
조회 수: 9 (최근 30일)
이전 댓글 표시
hi everyone
i have this table
0.04 0.06 0.08 0.1 0.12 0.15
20 1112 1239 1349 1432 1505 1629
16 1003 1115 1195 1264 1322 1415
10 836.3 917.3 978.6 1035 1075 1145
8 782.7 840.1 904 954 996 1056
7 734.9 804.1 864.1 911.7 949.8 1015
5 836.3 721 772.4 815.1 859.5 922.4

i want the same plot in matlab
surface 3d
can some one help me
댓글 수: 0
채택된 답변
Dyuman Joshi
2023년 9월 22일
Import the data, assign the first column as x data, top row as y data (or vice-versa, depending upon how you define the axis) and the remaining matrix as the z data, and then use surf.
%That would look like
x = [20 16 10 8 7 5];
y = [0.04 0.06 0.08 0.1 0.12 0.15];
z = [1112 1239 1349 1432 1505 1629;
1003 1115 1195 1264 1322 1415;
36.3 917.3 978.6 1035 1075 1145;
782.7 840.1 904 954 996 1056;
734.9 804.1 864.1 911.7 949.8 1015;
836.3 721 772.4 815.1 859.5 922.4 ];
surf(x,y,z)
set(gca,'XDir','reverse', 'YDir', 'reverse')
view([45 45])
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!