Smooth noisy data whilst keep absolute minimum and maximum values
I have a reasonably noisy signal (almost sinusoidal) that I am smoothing using sgolayfilt.
I am using a polynomial of 2 with a frame length of 901.
I am happy with the smoothing using this frame length.
However, there are several parts of the signal that need to have (correctly) a minimum value of zero.
When I smooth the signal the value of the minima are no longer zero. The lowest value of the smoothed curve at the minima takes a non-zero value, that might be positive or negative.
If I "shift" the curve then only one of the minima is zero.
Is there a method to smooth curves whilst keeping absolute minimum (and maximum if required) values? Or is it always a trade-off (I could trace the signal by eye very well, using a drawing package, keeping the minima, but I want to automate the process with matlab)
regardsI have a reasonably noisy signal (almost sinusoidal) that I am smoothing using sgolayfilt.
I am using a polynomial of 2 with a frame length of 901.
I am happy with the smoothing using this frame length.
However, there are several parts of the signal that need to have (correctly) a minimum value of zero.
When I smooth the signal the value of the minima are no longer zero. The lowest value of the smoothed curve at the minima takes a non-zero value, that might be positive or negative.
If I "shift" the curve then only one of the minima is zero.
Is there a method to smooth curves whilst keeping absolute minimum (and maximum if required) values? Or is it always a trade-off (I could trace the signal by eye very well, using a drawing package, keeping the minima, but I want to automate the process with matlab)
regards I have a reasonably noisy signal (almost sinusoidal) that I am smoothing using sgolayfilt.
I am using a polynomial of 2 with a frame length of 901.
I am happy with the smoothing using this frame length.
However, there are several parts of the signal that need to have (correctly) a minimum value of zero.
When I smooth the signal the value of the minima are no longer zero. The lowest value of the smoothed curve at the minima takes a non-zero value, that might be positive or negative.
If I "shift" the curve then only one of the minima is zero.
Is there a method to smooth curves whilst keeping absolute minimum (and maximum if required) values? Or is it always a trade-off (I could trace the signal by eye very well, using a drawing package, keeping the minima, but I want to automate the process with matlab)
regards smoothing, signal, sgolay, baseline correction MATLAB Answers — New Questions