comparison scripts/general/bicubic.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 1bf0ce0930be
children d1978e7364ad
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
77 [rz, cz] = size (Z); 77 [rz, cz] = size (Z);
78 elseif (nargin == 5 || nargin == 6) 78 elseif (nargin == 5 || nargin == 6)
79 [rz, cz] = size (Z) ; 79 [rz, cz] = size (Z) ;
80 if (isvector (X) && isvector (Y)) 80 if (isvector (X) && isvector (Y))
81 if (rz != length (Y) || cz != length (X)) 81 if (rz != length (Y) || cz != length (X))
82 error ("length of X and Y must match the size of Z"); 82 error ("length of X and Y must match the size of Z");
83 endif 83 endif
84 elseif (size_equal (X, Y) && size_equal (X, Z)) 84 elseif (size_equal (X, Y) && size_equal (X, Z))
85 X = X(1,:); 85 X = X(1,:);
86 Y = Y(:,1); 86 Y = Y(:,1);
87 else 87 else
182 182
183 for i = 1:lent 183 for i = 1:lent
184 it = indt(i); 184 it = indt(i);
185 int = [it, it+1, it+2, it+3]; 185 int = [it, it+1, it+2, it+3];
186 F(i,:) = ([ct0(i),ct1(i),ct2(i),ct3(i)] 186 F(i,:) = ([ct0(i),ct1(i),ct2(i),ct3(i)]
187 * (p(int,inds) .* cs0 + p(int,inds+1) .* cs1 187 * (p(int,inds) .* cs0 + p(int,inds+1) .* cs1
188 + p(int,inds+2) .* cs2 + p(int,inds+3) .* cs3)); 188 + p(int,inds+2) .* cs2 + p(int,inds+3) .* cs3));
189 endfor 189 endfor
190 190
191 ## Set points outside the table to extrapval. 191 ## Set points outside the table to extrapval.
192 if (! (isempty (xfirst_ind) && isempty (xlast_ind))) 192 if (! (isempty (xfirst_ind) && isempty (xlast_ind)))
193 F(:, [xfirst_ind, xlast_ind]) = extrapval; 193 F(:, [xfirst_ind, xlast_ind]) = extrapval;