2018/06/15

Matlab: Resample 重新取樣

To change the sample rate of an audio signal with Matlab, use the resample function:

load mtlb;
sound(mtlb,Fs);
pause(1); %Wait until the sound is finished
Fs_new = 16e3; %change the sample rate to 16000
[P,Q] = rat(Fs_new/Fs);

y = resample(mtlb,P,Q);

sound(y,Fs_new);

Reference

Changing Signal Sample Rate (MathWorks)

沒有留言:

張貼留言