Plot the time difference between two arrays

Hello, I have a problem and don't now if there is a matlab function to do that. I have several heart rate signal from different technology and I would like to compare the delay between a detection between these technology.
For the detection I use the function findpeak, so I have an array of position for each signal. Sadly sometimes the function doesn't detect a peak or detect 2 instead of one, so the arrays are not exactly the same length. I can plot the value but cannot make a point by point comparaison.. There is a function in order to compare the array point by point to see the varaition of delay between the technology? for exemple to compare the nearest point? Thank you, Pierre

1 Comment

jonas
jonas on 3 Sep 2018
Edited: jonas on 3 Sep 2018
If you upload an example of (a) a troublesome signal where the peaks are difficult to detect (b) another signal to calculate the lag, then it'd be easier to help! Don't forget to indicate the correct peaks of the former.
You should also check out cross correlation ( xcorr ), which could be a useful metric here

Sign in to comment.

Answers (0)

Asked:

on 3 Sep 2018

Edited:

on 3 Sep 2018

Community Treasure Hunt

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

Start Hunting!