How to resampling a signal (not interp1) which has a non-uniform sample frequency?

4 visualizaciones (últimos 30 días)
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.matlab2.JPG
This means that the two signals, although they have a similar shape, are not perfectly superimposable, like in the figure below.
matlab1.JPG
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!!!!!!!!!!!

Respuesta aceptada

Luuk van Oosten
Luuk van Oosten el 24 de Mayo de 2019
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 comentarios
Luuk van Oosten
Luuk van Oosten el 24 de Mayo de 2019
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.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by