program for upsample & downsample .wav file

Thread Starter


Joined Oct 26, 2008
I am new to matlab.:confused:I don't understand how to start the program for this.
I have one .wav audio file. Instructr said use readwav & writewav function.which needs to be read & up sampled and then down sample . how should I write code. can anyone help. This seems very easy but for beginners it is very hard.
Thank you.


Joined Nov 17, 2003
Go to the Matlab help and look up the wavread and wavwrite functions. Up/down sampling simply refers to the process of increasing/decreasing the sampling rate of the signal. If you know what the upsampling factor is you utilise the upfirdn function which does the following:

1. Upsamples the input data by the upsampling factor.

2. Applies an FIR filter to the upsampled signal data.

3. Downsamples the result by the downsample factor.

You will need to condition the arguments for it to work.