Global Index (short | long) | Local contents | Local Index (short | long)
[varargout] = keep_var(varargin);
[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.
This function calls | This function is called by |
---|---|
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