0% found this document useful (0 votes)
6 views8 pages

Signal Final Presentation

The document outlines a MATLAB code for recording audio, performing Fourier transform, and analyzing amplitude and phase spectra. It includes steps for plotting the time domain, amplitude spectra, and phase spectra, as well as calculating bandwidth and saving the audio file. Group members involved in the project are listed at the beginning.

Uploaded by

Rasham Saqib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views8 pages

Signal Final Presentation

The document outlines a MATLAB code for recording audio, performing Fourier transform, and analyzing amplitude and phase spectra. It includes steps for plotting the time domain, amplitude spectra, and phase spectra, as well as calculating bandwidth and saving the audio file. Group members involved in the project are listed at the beginning.

Uploaded by

Rasham Saqib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Audio recorder on

mat lab
Group Member
SAAD KAMRAN HOST (FA20-EPE-061)
AWAIS KHAN(FA20-EPE-039)
AFNAN ARIF(FA20-EPE-046)
CODE
• a=audiorecorder(16000,16,1)
• disp('start.')
• Recordblocking(a,8)
• disp('end.')
• play(a)
• data=getaudiodata(a);
• subplot(311);
• plot(data);
• xlabel('time');
• ylabel('amplitude');
• title('time domain');
Code of fourier transform
• forier=(fft(data,length(data)));
Code of amplitude spectra
• amplitudee_spectra=abs(forier);
• length_data=length(data);
• f=(-length_data/2 :length_data/2 -1).*(16000/length_data);
• subplot(312);
• plot(f,amplitudee_spectra);
• xlabel('frequency');
• ylabel('X(F)');
• title('Amplitude spectra');
Code of phase spectra
• phase_spectra=angle((forier));
• subplot(313);
• stem(f,phase_spectra );
• xlabel('frequency');
• ylabel ('phase(data)');
• title ('phase Spectram');
Code of bandwith

• xlim([-5,5])
• [LOWER,
UPPER]=bandwidth(amplitude_spectra);band_width=abs(
UPPER - LOWER);
Code of audio file
• filename='naat.mp3'; %fie name
• audiowrite(filename,data,16000);
Output

You might also like