Documentation of keep_var3


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

[varargout] = keep_var(varargin);

Help text


   [xkeep, ykeep] = keep_var(lim, x, y);

   where lim = [minx maxx miny maxy] to be kept.

   If lon and lat are not input, then they are assumed
   to be global variables under the names XAX and YAX.


Cross-Reference Information

This function calls

Listing of function keep_var3

function [varargout] = keep_var(varargin);

if nargin ~= nargout+1
  error(['[xk, ...] = keep_var(lim, x, ...);  '...
         'nargout must equal nargin + 1']);
end
lim = varargin{1};

for i = 1:nargout;
  x = varargin{i+1};
  varargout{i} = find(x >= lim(2*(i-1)+1) & ...
                      x <= lim(2*(i-1)+2) );
end