Use Matlab to read the provided audio sample and plot the audio file in Matlab….

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: