Functions | |
yi (range,:) | |
if (length(szx)==2 &&any(szx==1)) yi | |
!assert (interp1q(xp, yp,[min(xp)-1;max(xp)+1]),[NA;NA]) | |
!assert (interp1q(xp, yp, xp), yp, 100 *eps) | |
!assert (isempty(interp1q(xp, yp,[]))) | |
!assert (interp1q(xp, yp, xi), yi) | |
!assert (interp1q(xp,[yp, yp], xi),[yi, yi]) | |
!assert (interp1q(xp, yp,[xi, xi]),[yi, yi]) | |
!assert (interp1q(xp,[yp, yp],[xi, xi]), cat(3,[yi, yi],[yi, yi])) | |
Variables | |
function | yi |
nx = size (x, 1) | |
szy = size (y) | |
ny = szy (1) | |
nc = prod (szy (2 : end)) | |
y = reshape (y, ny, nc) | |
szx = size (xi) | |
xi = xi (:) | |
range = find (xi >= x (1) & xi <= x (nx)) | |
dy = y (2 : ny, :) - y (1 : ny - 1, :) | |
dx = x (2 : nx) - x (1 : nx - 1) | |
idx = lookup (x, xi, "lr") | |
s = (xi - x (idx)) ./ dx (idx) | |
endif endfunction!shared | xp |
endif endfunction!shared | yp = sin(2*pi*xp/5) |
endif endfunction!shared yi | !xp = [0:2:10].' |
!xi = [-1 | |
!yi = interp1 (xp,yp,xi) |
yi | ( | range | , | |
: | ||||
) |
!xi = [-1 |
endif endfunction !shared yi !xp = [0:2:10].' |
idx = lookup (x, xi, "lr") |
nx = size (x, 1) |
s = (xi - x (idx)) ./ dx (idx) |
szy = size (y) |
endif endfunction !shared xi = xi (:) |
endif endfunction !shared xp |