How can I compare a 1000 Hz signal with a 1024 Hz signal?

9 Ansichten (letzte 30 Tage)
Maria Ma
Maria Ma am 3 Aug. 2021
Kommentiert: Scott MacKenzie am 3 Aug. 2021
I have generated two sets of data. Each set of data is a 1-dimensional vector. The first vector contains samples which are generated with a sample rate of 1000 Hz. The second vector contains samples which are generated with a sample rate of 1024 Hz and is therefore a bit longer than the first vector. Both vectors contain samples over the same time span.
Now, I want to compare the two sets of data which are generated with different sample rates but over the same time span. But I am not sure how to do that properly. My goal is to derive the differences between these two vectors. I already tried to upsample the vector (with the 1000 Hz data) to 1024 Hz by using "resample". I know that resampling requires some filtering and will effect the ampltiude of the signal, which the "resample" function does. I´d like to keep the effects from the resampling as low as possible.
It looks like that the amplitude of the upsampled signal is overall 20% lower than the original signal. This decrease in the amplitude looks too high for me and affects my comparison too much.
So here are my questions:
  1. How can I compare two signals with two different sample rates properly?
  2. Do you have any suggestions how to implement this?
  3. Does my actual attempt makes sense to you?
Thank you very much in advance.
Best regards
  2 Kommentare
KSSV
KSSV am 3 Aug. 2021
You can interpolate and get the vectors to the same size.
Scott MacKenzie
Scott MacKenzie am 3 Aug. 2021
If you are worried about changes in amplitude, then you can use rescale to restore the amplitude after resampling, for example
y = resample( );
y2 = rescale(y, -1, 1];

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by