In: Electrical Engineering
Code:
rec = audiorecorder(96000,16,1); %created object rec for audio
recording with default parameters
recordblocking(rec, 20); %recording the sound using object for 20
s
play(rec); %play recoding recorded
y = getaudiodata(rec); %get the data recorded in double
format
figure(1);
plot(y); %plot of the recorded signal
tsignal = fft(y,100); %taking fourier transform of the signal
recorded
Recorded signal plot and code