0% found this document useful (0 votes)
5 views2 pages

DC Assignment 3

Uploaded by

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

DC Assignment 3

Uploaded by

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

Name: Ali Hassan

Enrollment: 01-133192-015

Class: BEE(7E)

Subject: Digital Communication

Date: 27-10-2022

Assignment 1
*Q#4(a)
Code:
%% Ali Hassan 015 %%

% Assign sampling Frequency


Fs=6000;
% Assign no of channels
channel=1;
%Data type 'unsigned integer'
datatype='uint8';
% no of bits
nobits=8;
% time
Nsec=5;
recorder=audiorecorder (Fs, nobits, channel);
disp('Please Speak To Record Audio.....')
recordblocking (recorder, Nsec);
disp('Its recorded.....');
audio=getaudiodata (recorder, datatype);
%Write audio file
audiowrite('audiosignal1.wav', audio, Fs);
plot(audio)

*Q#4(b)
Code:
%% Ali Hassan 015 %%

% Assign sampling Frequency


Fs=16000;
% Assign no of channels
channel=1;
%Data type 'unsigned integer'
datatype='uint8';
% no of bits
nobits=8;
% time
Nsec=5;
recorder=audiorecorder (Fs, nobits, channel);
disp('Please Speak To Record Audio.....')
recordblocking (recorder, Nsec);
disp('Its recorded.....');
audio=getaudiodata (recorder, datatype);
%Write audio file
audiowrite('audiosignal2.wav', audio, Fs);
plot(audio)

Allah Hafiz

You might also like