comparison scripts/geometry/griddata3.m @ 11472:1740012184f9

Use uppercase for variable names in error() strings to match Info documentation. Only m-files done.
author Rik <octave@nomad.inbox5.com>
date Sun, 09 Jan 2011 21:33:04 -0800
parents 95c3e38098bf
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
11471:994e2a93a8e2 11472:1740012184f9
35 if (nargin < 7) 35 if (nargin < 7)
36 print_usage (); 36 print_usage ();
37 endif 37 endif
38 38
39 if (!all (size (x) == size (y) & size (x) == size(z) & size(x) == size (v))) 39 if (!all (size (x) == size (y) & size (x) == size(z) & size(x) == size (v)))
40 error ("griddata3: x, y, z, and v must be vectors of same length"); 40 error ("griddata3: X, Y, Z, and V must be vectors of same length");
41 endif 41 endif
42 42
43 ## meshgrid xi, yi and zi if they are vectors unless they 43 ## meshgrid xi, yi and zi if they are vectors unless they
44 ## are vectors of the same length 44 ## are vectors of the same length
45 if (isvector (xi) && isvector (yi) && isvector (zi) 45 if (isvector (xi) && isvector (yi) && isvector (zi)
46 && (numel (xi) != numel (yi) || numel (xi) != numel (zi))) 46 && (numel (xi) != numel (yi) || numel (xi) != numel (zi)))
47 [xi, yi, zi] = meshgrid (xi, yi, zi); 47 [xi, yi, zi] = meshgrid (xi, yi, zi);
48 endif 48 endif
49 49
50 if (any (size(xi) != size(yi)) || any (size(xi) != size(zi))) 50 if (any (size(xi) != size(yi)) || any (size(xi) != size(zi)))
51 error ("griddata3: xi, yi and zi must be vectors or matrices of same size"); 51 error ("griddata3: XI, YI and ZI must be vectors or matrices of same size");
52 endif 52 endif
53 53
54 vi = griddatan ([x(:), y(:), z(:)], v(:), [xi(:), yi(:), zi(:)], varargin{:}); 54 vi = griddatan ([x(:), y(:), z(:)], v(:), [xi(:), yi(:), zi(:)], varargin{:});
55 vi = reshape (vi, size (xi)); 55 vi = reshape (vi, size (xi));
56 endfunction 56 endfunction