Trying to make the baseline of my data follow a sine curve.
6 views (last 30 days)
Show older comments
Brandon Steinlein
on 5 Dec 2020
Commented: Brandon Steinlein
on 5 Dec 2020
So Im trying to take a pre-recorded ECG data set and make the baseline follow a sine curve to mimic baseline wandering. I have tried fit(), the curve fitting tool box, polyfit(), but its not working.
Anyone got any ideas on how I can go about this or where I can find ECG data that is experiencing baseline wandering?
0 Comments
Accepted Answer
Cris LaPierre
on 5 Dec 2020
If you want to introduce baseline wandering, how are you hoping to use fit or polyfit? Why not just add the sin wave to your ecg signal?
ecg=readmatrix("ReducedRawECG.txt");
plot(ecg)
r = linspace(0,pi,length(ecg))';
w = sin(r);
hold on
plot(w)
plot(w+ecg)
hold off
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!