How can I compare a 1000 Hz signal with a 1024 Hz signal?
조회 수: 10 (최근 30일)
이전 댓글 표시
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:
- How can I compare two signals with two different sample rates properly?
- Do you have any suggestions how to implement this?
- Does my actual attempt makes sense to you?
Thank you very much in advance.
Best regards
댓글 수: 2
Scott MacKenzie
2021년 8월 3일
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];
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!