Dear all,
When I use the RNT toolbox(http://www.o3d.org/rnt/) to get my topography as the MAIN_grid.m said, I got problem when I run code of MAIN_grid below:
%==========================================================
% topography
%==========================================================
%EDIT: Choose how you want to make your topo. Below is some
% code that will do either Sandwell and Smith or ETOPO 5
h=grd.h;
h(:,:)=-4000; % set to some analytical function or use
% Sandwell and Smith below.
% OPTION 1:
% Extract Sandwell and Smith topo -----------------------
%region to be extracted from the Sandwell and Smith topo
%[south north west east];
region =reg(min(grd.latr(:))-1,max(grd.latr(:))+1,min(grd.lonr(:))-1+360,max(grd.lonr(:))+1+360)
and the wrong message is:
???Error using ==>reg
wrong number of input arguments.
I'm not familiar with the reg function, so I don't known the meaning. If anyone can solve this problem or tell me something about this error, I'll appreciate it. Thank you very much.
Problem about RNT MAIN_grid.m
Re: Problem about RNT MAIN_grid.m
It's the best to ask MANU for this specific issue. I think reg is a function in rnt directory, though you can NOT find it now.leon wrote:Dear all,
%[south north west east];
region =reg(min(grd.latr(:))-1,max(grd.latr(:))+1,min(grd.lonr(:))-1+360,max(grd.lonr(:))+1+360)
Alternatively,
region =[min(grd.latr(:))-1,max(grd.latr(:))+1,min(grd.lonr(:))-1+360,max(grd.lonr(:))+1+360]
will also do a good job.
good luck!
Re: Problem about RNT MAIN_grid.m
yes,you are right.
I think
region =[min(grd.latr(:))-1,max(grd.latr(:))+1,min(grd.lonr(:))-1,max(grd.lonr(:))+1]
is ok.
Thank you very much
I think
region =[min(grd.latr(:))-1,max(grd.latr(:))+1,min(grd.lonr(:))-1,max(grd.lonr(:))+1]
is ok.
Thank you very much