Polyinterp: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
Polynomial interpolation, smoothing, and differentiation. | Polynomial interpolation, smoothing, and differentiation. | ||
===Synopsis=== | ===Synopsis=== | ||
:yi = polyinterp(x,y,''xi,width,order,deriv''); | :yi = polyinterp(x,y,''xi,width,order,deriv''); | ||
===Description=== | ===Description=== | ||
Estimates (yi) which is the smoothed values of (y)''' '''at the points in the vector (x). (If the points are evenly''' '''spaced use the SAVGOL function instead.) | Estimates (yi) which is the smoothed values of (y)''' '''at the points in the vector (x). (If the points are evenly''' '''spaced use the SAVGOL function instead.) | ||
====INPUTS==== | ====INPUTS==== | ||
* '''y''' = (M by N) matrix. Note that (y) is a matrix of ROW''' '''vectors to be smoothed. | * '''y''' = (M by N) matrix. Note that (y) is a matrix of ROW''' '''vectors to be smoothed. | ||
* '''x''' = (1 by N) corresponding axis vector at the points at''' '''which (y) is given. | * '''x''' = (1 by N) corresponding axis vector at the points at''' '''which (y) is given. | ||
====OPTIONAL INPUTS==== | ====OPTIONAL INPUTS==== | ||
* '''xi''' = a vector of points to interpolate to. | * '''xi''' = a vector of points to interpolate to. | ||
* '''width''' = specifies the number of points in the filter {default = 15}. | * '''width''' = specifies the number of points in the filter {default = 15}. | ||
* '''order''' = the order of the polynomial {default = 2}. | * '''order''' = the order of the polynomial {default = 2}. | ||
* '''deriv''' = the derivative {default = 0}. | * '''deriv''' = the derivative {default = 0}. | ||
===Examples=== | ===Examples=== | ||
If y is a 5 by 100 matrix, x is a 1 by 100 vector, and xi is a 1 by 91 vector then polyinterp(x,y,xi,11,3,1) gives the 5 by 91 matrix of first-derivative row vectors resulting from an 11-point cubic interpolation to the 91 points in xi. | If y is a 5 by 100 matrix, x is a 1 by 100 vector, and xi is a 1 by 91 vector then polyinterp(x,y,xi,11,3,1) gives the 5 by 91 matrix of first-derivative row vectors resulting from an 11-point cubic interpolation to the 91 points in xi. | ||
===See Also=== | ===See Also=== | ||
[[baseline]], [[lamsel]], [[mscorr]], [[savgol]], [[stdfir]] | [[baseline]], [[lamsel]], [[mscorr]], [[savgol]], [[stdfir]] |
Revision as of 15:26, 3 September 2008
Purpose
Polynomial interpolation, smoothing, and differentiation.
Synopsis
- yi = polyinterp(x,y,xi,width,order,deriv);
Description
Estimates (yi) which is the smoothed values of (y) at the points in the vector (x). (If the points are evenly spaced use the SAVGOL function instead.)
INPUTS
- y = (M by N) matrix. Note that (y) is a matrix of ROW vectors to be smoothed.
- x = (1 by N) corresponding axis vector at the points at which (y) is given.
OPTIONAL INPUTS
- xi = a vector of points to interpolate to.
- width = specifies the number of points in the filter {default = 15}.
- order = the order of the polynomial {default = 2}.
- deriv = the derivative {default = 0}.
Examples
If y is a 5 by 100 matrix, x is a 1 by 100 vector, and xi is a 1 by 91 vector then polyinterp(x,y,xi,11,3,1) gives the 5 by 91 matrix of first-derivative row vectors resulting from an 11-point cubic interpolation to the 91 points in xi.