code:
Fs=32000;
recObj=audiorecorder(Fs,16,1);
get(recObj)
%record your voice for 5 seconds
disp('Start speaking.')
recordblocking(recObj,5);
disp('End of Recording');
%playback the recording
play(recObj);
%Store data in double-precision array
myRecording=getaudiodata(recObj);
filename='anam audio.wav';
audiowrite(filename,myRecording,Fs);
[y,Fs] = audioread('anam audio.wav');
plot(y)
dtft(y')
out=decimate(y,2);
figure
dtft(out')
out1=decimate(out,2);
figure
dtft(out1')