y = sgolayfilt(x order framelen) applies a Savitzky-Golay finite impulse response (FIR) smoothing filter of polynomial order order and frame length framelen to the data in vector x If x is a matrix  then sgolayfilt operates on each column