Eliminate the baseline wavering of this signal

34 views (last 30 days)
I am not able to eliminate the baseline wavering after applying detrend function of matlab. I saw some answers suggesting to use butterword bandpass filter, but i could not find which frequency to use for elimination of the baseline wavering. It would be really helpful if someone helps with the same. I have attached the data for usage.
  3 Comments
Prem Aravindan
Prem Aravindan on 25 Jul 2020
Thank you for replying. Your answers for several questions have paved me a way to improve my MATLAB skills.
As I am just a beginner to the signal processing techniques, I am not sure what method exactly to implement. But any method that is being implemented should not affect the features in it when used for feature extraction in future. Any method that you find suitable will do the needful.
Prem Aravindan
Prem Aravindan on 28 Jul 2020
Please help me eliminate the baseline wavering, it would be really helpful. Thank you.

Sign in to comment.

Answers (1)

Swetha Polemoni
Swetha Polemoni on 3 Sep 2020
Hi,
Baseline wavering can be eliminated by using "polyfit()" function followed by "polyval()" function.
Step1: Calculate a first order or a linear fit to the signal using “polyfit”.
Step2: Calculate the linear fit output within the range of your signal using “polyval
Step3: Subtract linear fit output from your signal.
It can also be done by subtracting moving average of the signal from signal. Moving average can be calculated by function "movmean()".

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!