I am trying to calculate the time of flight (in milliseconds) from a set of acoustic signals. The data I have looks like this:
voltage 500x8000 double
time 500x8000 double
I've tried playing around with the xcorr function but I'm not sure of how I can actually measure the time of flight. I notice the xcorr function produces a 2M-1 long vector for each correlation, how can I use these values to extract the position of the peak in relation to the time vector? Many thanks.