How to scale a dataset to fit an other dataset?

조회 수: 5 (최근 30일)
roelst
roelst 2015년 6월 3일
댓글: Salaheddin Hosseinzadeh 2015년 6월 4일
I am working on a filter for a heartbeat sensor. Therefore I want to fit a 'perfect' heart beat graph (without noise) onto a signal with noise. Is there a function in matlab to scale the 'perfect' data such that it fits onto the signal with noise?
Since a heart rate is not constant, the perfect graph needs to be scaled in both amplitude and time/frequency in order to fit it onto the signal with noise.

채택된 답변

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015년 6월 3일
Hi,
I recently found about Savitzky-Golay filter, which I think you will like it very much for your application.
Have a look at MATLAB help for
doc sgolay
Hope this helps.
  댓글 수: 9
roelst
roelst 2015년 6월 4일
Thank you a lot!
It started out as a MATLAB question as I was wondering whether there was a function that defines all the parameters A, B, C, and D (or something similar) automatically by creating the best possible overlap. But it seems that such function is not available in MATLAB and needs to be created by myself.
The biggest problem is still finding the value for A as the fft gives multiple peaks and I need to figure out a way to automatically select the one I need. Looking at the difference between two peaks in the measured data is not an option as the motion artifacts screw up that data.
Again thank you for your advise, it has helped me a lot!
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015년 6월 4일
Dear Roelst,
I'm glad that it helped.
If you have curve fitting toolbox, you may wanna have a loot at the fitting options, type cftool in command window and you will see the GUI
cftool
As far as I remember there are built in sin wave fittings, using multiple sins, you can even define your own custom function if you like.
Have a look at that, it may help you with the fitting.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Thomas Koelen
Thomas Koelen 2015년 6월 3일
편집: Thomas Koelen 2015년 6월 3일
  댓글 수: 1
roelst
roelst 2015년 6월 3일
Thank you for your answer.
Could you specify how this function would be of help?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spline Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by