Problem about RNT MAIN_grid.m

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
leon
Posts: 78
Joined: Mon Mar 03, 2008 4:14 am

Problem about RNT MAIN_grid.m

#1 Unread post by leon »

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.

feroda

Re: Problem about RNT MAIN_grid.m

#2 Unread post by feroda »

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)
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.
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!

leon
Posts: 78
Joined: Mon Mar 03, 2008 4:14 am

Re: Problem about RNT MAIN_grid.m

#3 Unread post by leon »

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

Post Reply