How to resampling a signal (not interp1) which has a non-uniform sample frequency?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi everybody!
I have two signals which represents angular kinematic of the upper limb. One signal has been acquired with IMU sensors and the other one with a stereophotogrammetric system. I have to compare those signals in order to verify the validity of the IMU system, but I have a big problem: the signal acquired with the sensors (the red one in the figure below) has not a uniform sampling frequency That means: due to the delay that the bluetooth module add when it pass the information from the sensors to pc I have different sampling time between two consecutive samples. The difference between an instant and the successive is reported in figure.
This means that the two signals, although they have a similar shape, are not perfectly superimposable, like in the figure below.
I tried to resample both the signals with interp1 but anything changes.
How can I manage this problem and resampling correctly the signal in order to make them superimposable?
Thanks so much!!!!!!!!!!!
댓글 수: 0
채택된 답변
Luuk van Oosten
2019년 5월 24일
Sounds like a perfect job for msresample, so you can make two signals with the same sample rate to your liking. Use something like:
msresample(X,Y,nrofsamples 'Uniform', 1,)
댓글 수: 2
Luuk van Oosten
2019년 5월 24일
You are welcome. I don't know exactly what you are gonna do with your angular kinematics stuff, but if it contains lots of this spectral-like data, have a look at some of the other functions in the Bioinformatics/mass spec department of MATLAB. You might find another little function that could assist in your tasks! By the looks of it you might find something like msalign or mspeaks interesting as well, if you are dealing with small misalignments of your data and/or are looking for certain events.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!