I have a question about sammpling rate in MATLAB. I read a .wav file using audioread(). It give me sampled data called my_data, and $88.2 \textrm{ kHz}$ as a samping rate, called Fs.

When I played this data with audioplayer(my_data, Fs), it works well and totally right sounds with original file.

What I tried to do is getting odd-indexed data like this :

my_data = [1 2 3 4 5 6 7 8 9 10]
my_odd_data = [1 3 5 7 9]

I thought that this procedure is like sampling my_data with half of Fs, but it is not true. I want to know why this procedure is not sampling with Fs/2.

  • $\begingroup$ How did you verify that its not sampling with Fs/2 . from your description it looks it should work. and even I have tried it and it works $\endgroup$
    – Arpit Jain
    May 11 '16 at 8:54
  • 3
    $\begingroup$ You have to use low-pass filter first. Then you can decimate your signal. Otherwise you will end up with aliasing. $\endgroup$
    – jojek
    May 11 '16 at 8:55

As people have said in the comments, to have it sound right you will need to low pass filter before subsampling.

The matlab function decimate does this automatically and gives some control over the type of low pass filter used.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.