Eliminate the baseline wavering of this signal

5 views (last 30 days)
Prem Aravindan
Prem Aravindan on 25 Jul 2020
Answered: Swetha Polemoni on 3 Sep 2020
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 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!

Translated by