What should be dimension of surf(X,Y,Z) 3D?
조회 수: 16 (최근 30일)
이전 댓글 표시
I have profile of earth. Surface plot and dimension is not same so How can I plot ?
clc;
close all;
clear all;
format long g;
load('dtm.mat'); %% using old data sets
% plotting the value %%
figure()
title('DTM of the surface of Mountain')
surf(transpose(hw),rw,Z);
xlabel('Longitude')
ylabel('Lateral')
zlabel('Vertical height')
댓글 수: 2
답변 (2개)
Sulaymon Eshkabilov
2021년 6월 12일
There are a few errs and missing points in your code. Here is the corrected complete code.
clearvars;
format long g;
load('dtm.mat'); %% using old data sets
% plotting the value %%
[Hw, Rw] = meshgrid(hw, rw); % Meshgrid is required for 3D plots for x, y axes
figure()
title('DTM of the surface of Mountain')
surf(Hw,Rw,Z'); % Transpose of Z is necessary here
xlabel('Longitude')
ylabel('Lateral')
zlabel('Vertical height')
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!