Use Matlab to read the provided audio sample and plot the audio file in Matlab….
[ad_1]
Use Matlab to read the provided audio sample and plot the audio file in Matlab. The given audio file is named s1.wav.
[wave,fs]=audioread(‘s1.wav’)
t=0:1/fs:(length(wave)-1)/fs
subplot(2,1,1)
plot(t,wave)
xlabel(‘Time’);
ylabel(‘Amplitude’);
n=length(wave)-1
f=0:fs/n:fs
wavefft=abs(fft(wave))
subplot(2,1,2)
plot(f,wavefft)
xlabel(‘Frequency’);
ylabel(‘Amplitude’);
2.1Plot the time domain and frequency domain of the audio signal
Attachments:
rama.docx
[Button id=”1″]