Navigation

Operators and Keywords

Function List:

C++ API

interp1q.m File Reference


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)

Function Documentation

!assert ( interp1q(xp,[yp, yp],[xi, xi])  ,
cat(3,[yi, yi],[yi, yi])   
)

!assert ( interp1q(xp, yp,[xi, xi])   ) 

!assert ( interp1q(xp,[yp, yp], xi  ) 

!assert ( interp1q(xp, yp, xi ,
yi   
)

!assert ( isempty(interp1q(xp, yp,[]))   ) 

!assert ( interp1q(xp, yp, xp ,
yp  ,
100 *  eps 
)

!assert ( interp1q(xp, yp,[min(xp)-1;max(xp)+1])   ) 

if ( length(szx = =2 &&any(szx==1)  ) 

yi ( range  ,
 
)


Variable Documentation

!xi = [-1

endif endfunction !shared yi !xp = [0:2:10].'

!yi = interp1 (xp,yp,xi)

dx = x (2 : nx) - x (1 : nx - 1)

dy = y (2 : ny, :) - y (1 : ny - 1, :)

idx = lookup (x, xi, "lr")

nc = prod (szy (2 : end))

nx = size (x, 1)

ny = szy (1)

range = find (xi >= x (1) & xi <= x (nx))

s = (xi - x (idx)) ./ dx (idx)

szx = size (xi)

szy = size (y)

endif endfunction !shared xi = xi (:)

endif endfunction !shared xp

y = reshape (y, ny, nc)

else yi

Initial value:

 interp1q (x, y, xi)
  x = x(:)

yp = sin(2*pi*xp/5)