Faizan Aslam

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Faizan aslam

Sp210020
Task 01

clc
clear
x=[ 1 -1.5 2 -0.75 3 -2 0.5];
h=[-1 0 0.5 2.5 1];
x=[ 1 -1.5 2 -0.75 3 -2 0.5];
h=[-1 0 0.5 2.5 1]
y=conv(x,h);
subplot(313);stem(y);title('output
Signal');
y

h
Task 02(a)
load handel
sound(y )
% Calculating Total Time of Signal
time=(1/Fs)*length(y); %its explained in
equation 1 below.
% plotting
t=linspace(0,time,length(y));
plot(t,y)
(B)

load gong.mat;
sound(y )
% Calculating Total Time of Signal
time=(1/Fs)*length(y); %its explained in
equation 1 below.
% plotting
t=linspace(0,time,length(y));
plot(t,y)
task
load handel
sound(y,Fs);
time=(1/Fs)*length(y);
t=linspace(0,time,length(y));
plot(t,y)

You might also like