comparison scripts/general/interp2.m @ 11108:78a6016875ed

general/interp2.m: Fix input checks for cubic interpolation (bug #31352, part 1).
author Gunnar Farneback <gunnar@lysator.liu.se>
date Mon, 18 Oct 2010 16:53:57 +0200
parents e48a45b9a265
children 1740012184f9
comparison
equal deleted inserted replaced
11107:811b51cdddce 11108:78a6016875ed
324 324
325 ## Check dimensions of X and Y 325 ## Check dimensions of X and Y
326 if (isvector (X) && isvector (Y)) 326 if (isvector (X) && isvector (Y))
327 X = X(:).'; 327 X = X(:).';
328 Y = Y(:); 328 Y = Y(:);
329 if (!isequal ([length(X), length(Y)], size(Z))) 329 if (!isequal ([length(Y), length(X)], size(Z)))
330 error ("interp2: X and Y size must match Z dimensions"); 330 error ("interp2: X and Y size must match Z dimensions");
331 endif 331 endif
332 elseif (!size_equal (X, Y)) 332 elseif (!size_equal (X, Y))
333 error ("interp2: X and Y must be matrices of same size"); 333 error ("interp2: X and Y must be matrices of same size");
334 if (! size_equal (X, Z)) 334 if (! size_equal (X, Z))