/[MITgcm]/MITgcm/utils/matlab/griddata_preprocess.m
ViewVC logotype

Diff of /MITgcm/utils/matlab/griddata_preprocess.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by jmc, Sat Feb 17 23:49:43 2007 UTC revision 1.3 by jmc, Fri May 29 14:03:30 2009 UTC
# Line 14  function [del] = griddata_preprocess(x,y Line 14  function [del] = griddata_preprocess(x,y
14    
15  error(nargchk(4,5,nargin))  error(nargchk(4,5,nargin))
16    
17  if prod(size(xi)) ~= prod(size(yi))  %- To interpolate to a section (with position vector xi,yi), skip the
18    %  ndgrid call hereafter. However, since this is poorly documented,
19    %  leave the unconditional call to ndgrid to avoid falling into this trap
20    %  when doing 2-D interpolation on to a square grid (xi & yi of equal size)
21    %if prod(size(xi)) ~= prod(size(yi))
22   [yi,xi]=ndgrid(yi,xi);   [yi,xi]=ndgrid(yi,xi);
23  end  %end
24    
25  if nargin<6, method = 'linear'; end  if nargin<6, method = 'linear'; end
26  if ~isstr(method),  if ~isstr(method),

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22