Default filter setting of non-uniform sampled signals.
이전 댓글 표시
Dear all.
I need to identify the implementation of the resample function for porting the algorithm to another language. The following code represents the part of the resample function call that I am currently struggling to replicate.
resample(x, tx, fs, 'linear')
When inputting non-uniform signals into the resample function and obtaining results resampled at an arbitrary sample rate while applying linear interpolation, I understand from the documentation that it uses "a polyphase antialiasing filter". https://www.mathworks.com/help/signal/ref/resample.html#d126e159631
However, there is no explanation about the detailed design method of the filter, so I cannot create a similar filter.
How is the filter for nonuniformly sampled data designed in the resample function?
답변 (1개)
Shlok
2025년 2월 28일
Hi Hiroaki,
I understand that you're looking to replicate the algorithm of MATLAB's "resample" function in another language. You can view the source code of the "resample" function by using the MATLAB's "open" command:
open resample
This will allow you to see exactly how the function is implemented. Based on the source code, here's my understanding:
- For non-uniformly sampled data, the function first interpolates the data onto a uniform grid using linear interpolation.
- Then, it designs a filter using a windowing method, specifically the Kaiser window, to create a finite impulse response (FIR) filter. This filter is applied to the signal after it has been upsampled to prevent aliasing.
- Finally, the filtered signal is downsampled to achieve the desired resampling rate.
To know more about resampling non-uniformly sampled signals, refer to the following MathWorks documentation link:
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!