Functions | |
endif | if (nargin==7 &&isscalar(spline_alpha)) a |
endif | if (nargin< 6) extrapval |
endif | if (isa(X,"single")||isa(Y,"single")||isa(Z,"single")||isa(XI,"single")||isa(YI,"single")) myeps |
endif | if (nargin<=2) if(nargin |
elseif (nargin==3) if(!isvector(X)||!isvector(Y)) error("XI and YI must be vector") | |
if (isvector(X)&&isvector(Y)) if(rz! | |
endif | elseif (size_equal(X, Y)&&size_equal(X, Z)) X |
else | error ("X, Y and Z must be martrices of same size") |
XI (xfirst_ind) | |
XI (xlast_ind) | |
YI (yfirst_ind) | |
YI (ylast_ind) | |
X (cz)* | |
if (X(cz)==0) X(cz) | |
Y (rz)* | |
if (Y(rz)==0) Y(rz) | |
else | print_usage () |
inds (d) | |
s (d) | |
indt (d) | |
t (d) | |
p (2:rz+1, 2:cz+1) | |
p (1,:) | |
p (rz+2,:) | |
p (:, 1) | |
p (:, cz+2) | |
F (i,:) | |
endfor if(!(isempty(xfirst_ind)&&isempty(xlast_ind))) F(endif | if (!(isempty(yfirst_ind)&&isempty(ylast_ind))) F([yfirst_ind |
!mesh (xi, yi, bicubic(x, y, A, xi, yi)) | |
plot3 (x(:), y(:), A(:),"b*") | |
Variables | |
function | F |
else | myeps = eps |
else | n = Y |
endif | Z = X |
X = [] | |
s = size (Z) linspace (1, cz, (cz-1)*pow2(n)+1) | |
t = linspace (1, rz, (rz-1)*pow2(n)+1) | |
cz = size (Z) | |
Y = Y(:,1) | |
endif | xfirst_ind = find (XI < X(1)) |
xlast_ind = find (XI > X(cz)) | |
yfirst_ind = find (YI < Y(1)) | |
ylast_ind = find (YI > Y(rz)) | |
endif | |
XI = reshape (XI, 1, length (XI)) | |
o = sort ([X, XI]) cumsum (i <= cz) | |
xidx = o(find (i > cz)) | |
YI = reshape (YI, length (YI), 1) | |
yidx = o([find(i > rz)]) | |
endif | inds = floor (s) |
d = find (s == cz) | |
indt = floor (t) | |
p = zeros (size (Z) + 2) | |
t2 = t.*t | |
t3 = t2.*t | |
ct0 = -a .* t3 + (2 * a) .* t2 - a .* t | |
ct1 = (2-a) .* t3 + (-3+a) .* t2 + 1 | |
ct2 = (a-2) .* t3 + (-2 *a + 3) .* t2 + a .* t | |
ct3 = a .* t3 - a .* t2 | |
s2 = s.*s | |
s3 = s2.*s | |
cs0 = -a .* s3 + (2 * a) .* s2 - a .*s | |
cs1 = (2-a) .* s3 + (-3 + a) .* s2 + 1 | |
cs2 = (a-2) .* s3 + (-2 *a + 3) .* s2 + a .*s | |
cs3 = a .* s3 - a .* s2 | |
lent = length (ct0) | |
lens = length (cs0) | |
for | i |
int = [it, it+1, it+2, it+3] | |
__pad0__ | |
endif endfunction!demo | !A = [13,-1,12 |
!x = [0,1,4]+10 | |
y = [-10,-9,-8] | |
!xi = linspace(min(x),max(x),17) | |
!yi = linspace(min(y),max(y),26)' | |
!hold | on = meshgrid(x,y) |
hold | off = off / 2 |
elseif | ( | nargin | = = 3 |
) |
F | ( | i | , | |
: | ||||
) |
endfor if (! (isempty (xfirst_ind) && isempty (xlast_ind))) F( endif if | ( | ! | isempty(yfirst_ind)&&isempty(ylast_ind) | ) |
if | ( | Y(rz) | = =0 |
) |
if | ( | X(cz) | = =0 |
) |
if | ( | isvector(X)&&isvector(Y) | ) |
endif if | ( | ) |
inds | ( | d | ) |
indt | ( | d | ) |
p | ( | : | , | |
cz+ | 2 | |||
) |
p | ( | : | , | |
1 | ||||
) |
p | ( | rz+ | 2, | |
: | ||||
) |
p | ( | 1 | , | |
: | ||||
) |
p | ( | 2:rz+ | 1, | |
2:cz+ | 1 | |||
) |
plot3 | ( | x(:) | , | |
y(:) | , | |||
A(:) | , | |||
"b*" | ||||
) |
else print_usage | ( | ) |
s | ( | d | ) |
t | ( | d | ) |
X | ( | cz | ) |
XI | ( | xlast_ind | ) |
XI | ( | xfirst_ind | ) |
Y | ( | rz | ) |
YI | ( | ylast_ind | ) |
YI | ( | yfirst_ind | ) |
endif endfunction !demo !A = [13,-1,12 |
!x = [0,1,4]+10 |
!xi = linspace(min(x),max(x),17) |
!yi = linspace(min(y),max(y),26)' |
c d = find (s == cz) |
elseif F |
endif inds = floor (s) |
indt = floor (t) |
else n = Y |
! hold on = meshgrid(x,y) |
p = zeros (size (Z) + 2) |
s2 = s.*s |
s3 = s2.*s |
t = linspace (1, rz, (rz-1)*pow2(n)+1) |
t2 = t.*t |
t3 = t2.*t |
X = [] |
endif xfirst_ind = find (XI < X(1)) |
endif case XI = reshape (XI, 1, length (XI)) |
y = [-10,-9,-8] |
Y = Y(:,1) |
yfirst_ind = find (YI < Y(1)) |
endif YI = reshape (YI, length (YI), 1) |
ylast_ind = find (YI > Y(rz)) |