IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
diff_sg.m File Reference

Detailed Description

Savitzky-Golay differentiation.

There are two ways to use it:

[X_after] = diff_sg(X, [], order, porder, ncoeff);

Definition in file diff_sg.m.

Go to the source code of this file.

Functions

function diff_sg (in X, in x, in order, in porder, in ncoeff)
 

Function Documentation

function diff_sg ( in  X,
in  x,
in  order,
in  porder,
in  ncoeff 
)
1 [X_after, x_after] = diff_sg(X, x, order, porder, ncoeff);

First case is when second parameter (x) is passed as an []

Parameters
XMatrix
xx-axis values corresponding to the columns of X
orderDifferential order. Accepted values: 1 or 2
porderPolynomial order
ncoeffNumber of filter coefficients. Must be off
Returns
[X_after] or [X_after, x_after] as described above.