使用开源网站得到数据,想在matlab里画出三维地形图,使用mesh函数没有出现报错。
接线来想将mesh函数画出的三维平面下方的空白进行填充操作,了解到meshz函数有这个功能,就按照meshz函数文件的格式运行了一下,下面是meshz的说明文件,以及我想要的效果图:
按照下面这段代码执行了以下,就出现了报错,大佬们,这是哪出现了错误啊
lat = ncread('GEBCO122_125E22_25N.nc','lat');
lon = ncread('GEBCO122_125E22_25N.nc','lon');
elevation = ncread('GEBCO122_125E22_25N.nc','elevation');
meshz(lat,lon,elevation)
**
这里是meshz的函数代码:
**
function h=meshz(arg1, arg2, arg3, arg4, arg5, propArgs)
%MESHZ 3-D mesh with curtain.
% MESHZ(...) is the same as MESH(...) except that a "curtain" or
% reference plane is drawn beneath.
%
% This routine only works for surfaces defined on a rectangular
% grid. The matrices X and Y define the axis limits only.
%
% See also MESH, MESHC.
% Clay M. Thompson 3-20-91
% Copyright 1984-2020 The MathWorks, Inc.
arguments
arg1 = [];
arg2 = [];
arg3 = [];
arg4 = [];
arg5 = [];
propArgs.?matlab.graphics.chart.primitive.Surface
end
propCell = namedargs2cell(propArgs);
args = {
arg1, arg2, arg3, arg4, arg5};
[~, cax, args] = parseplotapi(args{
1:nargin}, '-mfilename', mfilename);
if isfield(propArgs,'Parent') % Always honor the 'Parent' PVPair value
cax = propArgs.Parent;
end
nargs = length