How to downsample a signal
Show older comments
I have read an audio signal .wav with a Sampling frequency fs = 44100
[y Fs]= audioread('as6.mp3');
[N,P]=size(y);
ts=1/Fs;
tmax=(N-1)*ts;
t=0:ts:tmax;
I am interested to study the frequencies under 8000 of this signal with the function downsampling ()
so, How can I do it
5 Comments
Paul
on 21 Jun 2022
Is the goal to really downsample the signal, i.e., change the sampling frequency from 44100 Hz to 8000 Hz?
Or is the goal to anlayze the signal as provided but only focus on the frequency range 0 - 8000 Hz?
Abdelhakim Souidi
on 22 Jun 2022
Paul
on 22 Jun 2022
Then no need to downsample or decimate? Just do whatever analysis needs to be done and focus on the plot (or whatever is generated) in the range from 0-8000 Hz.
Abdelhakim Souidi
on 22 Jun 2022
Basic concepts:
downsample - In the basic case, equivalent to indexing with an integer step
x = rand(1,20);
N = 3;
isequal(x(1:N:end),downsample(x,N))
decimate - Applies a low pass filter to x to avoid aliasing before downsampling
upsample - Inserts zeros between elements of the input array
interp - Applies a filter after upsampling x
resample - When applied to uniformly spaced data, modifies the sampling rate by a rational multilple p/q. Filtering is involved. Don't know if resample and decimate (or interp) can be made to yield the same result with appropriate selection of input arguments.
Accepted Answer
More Answers (0)
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!