You are on page 1of 11

SIGNAL AND SYSTEMS

ASSIGNMENT-1

Roll no:2018 ee 69

Q.1.3

syms t
syms n
%a
GF=exp(-4*t)

GF =

DF=int(GF,t,0,inf)

DF =

ezplot(DF)

P=(1/(2*t))*DF

P =

ezplot(P)

%b

DS=exp((-1^1/2)*2*(2*t+3.14/4))

DS =

answ1=int(DS,t,-inf,inf)

answ1 =

ezplot(answ1)

1
P1=(1/(2*t))*answ1

P1 =

ezplot(P1)

%c
t2=cos(t)*cos(t)

t2 =

answ2=int(t2,t,-inf,inf)

answ2 =

ezplot(answ2)

P2=(1/(2*t))*answ2

P2 =

ezplot(P2)

%d
TR=(1/2)^n

TR =

UI=symsum(TR,n,0,inf)

UI =

stem(UI)

2
P3=(1/((2*n)+1))*UI

P3 =

stem(limit(P3, 1))

%e
IO=exp((-1^1/2)*((pi/2*n)+pi/8))

IO =

an4=symsum(IO,n,-inf,inf)

an4 =

stem(an4)

P4=(1/((2*n)+1))*an4

P4 =

stem(limit(P4, 1))

Q.1.7

Part-b

b1=sin((1/2)*t)

b1 =

3
b2=-sin((1/2)*t)

b2 =

b3=(b1+b2)/2

b3 =

find(b3)

ans =

[]

%zero for all values of t

Q.23

Part-a

syms t
o = piecewise(0<=t<1, t, 1<=t<2, -t+2 , t>=2,0, t<=0,0)

o =

%fplot(y)
y2=piecewise(-1<=t<0, -t, -2<=t<-1, t+2 , t<=-2,0, t>=0,0)

y2 =

%fplot(y2)
even1=(o+y2)/2

even1 =

4
fplot(y3)

odd1=(o-y2)/2

odd1 =

fplot(y4)

Part-b

y5= piecewise(-2<=t<-1, t+2, -1<=t<0, -t , 0<=t<1, t, 1<=t<100,1 , t<=-2,0 )

y5 =

%fplot(y5)
y6=piecewise(-100<t<-1, 1, -1<=t<0, -t, 0<=t<1, t, 1<=t<2, 2-t, t>=2,0)

y6 =

5
%fplot(y6)
even2=(y5+y6)/2

even2 =

odd2=(y5-y6)/2

odd2 =

fplot(even2)

fplot(odd2)

Part-c

y7 = piecewise(t<0, -2*t, t>0, t)

y7 =

6
y8 = piecewise(t<0, -t , t>0 , 2*t)

y8 =

even3=(y7+y8)/2

even3 =

odd3=(y7-y8)/2

odd3 =

fplot(even3)

fplot(odd3)

Q-24

Part-a

U1 = -10:1:10;

part1 = @(m) (-1).*((m<0)) + (m>-1);


stem(U1, part1(U1))

EVn_part = ( part1(U1)+part1(-U1) )/2;


ODd_Part = ( part1(U1)-part1(-U1) )/2;

subplot(311); stem(U1, part1(U1)); xlabel('m'); ylabel('x(m)');


subplot(312); stem(U1, EVn_part); xlabel('m'); ylabel('EVn ');
subplot(313); stem(U1, ODd_Part); xlabel('m'); ylabel('OdD');

7
Part-b

E1 = -10:1:10;

Part2 = @(k) (k+3).*((k>=-2) - (k>0)) + ((k>=7) - (k>7));

EVV_P = ( Part2(E1)+Part2(-E1) )/2;


ODD_P = ( Part2(E1)-Part2(-E1) )/2;

subplot(311); stem(E1, Part2(E1)); xlabel('k'); ylabel('k');


subplot(312); stem(E1, EVV_P); xlabel('k'); ylabel('EVV P');
subplot(313); stem(E1, ODD_P); xlabel('k'); ylabel('ODD P');

Part-c

l = -10:1:10;

orig_signal = @(l) (l+3).*((l>=-4) - (l>-4)) + 2.*((l>-4) - (l>=-1)) + ((l>=-1) - (l>0)) + 2.*(

evn_P = ( orig_signal(l)+orig_signal(-l) )/2;


odd_P = ( orig_signal(l)-orig_signal(-l) )/2;

subplot(311); stem(l, orig_signal(l)); xlabel('l'); ylabel('l');


subplot(312); stem(l, evn_P); xlabel('n'); ylabel('Evn P');
subplot(313); stem(l, odd_P); xlabel('n'); ylabel('odd p');

Q 1.54

Part-a

syms n;
syms N;
syms a;

o=(sym(a))^n;
o1=symsum(o,n,0,N-1)

o1 =

p=(1-(sym(a))^n)/(1-(sym(a)))

p =

8
p1=symsum(p,n,0,N-1)

p1 =

Part-b

o2=(sym(a))^n;
q1=symsum(o2,n,0,inf)

q1 =

E1=1/(1-(sym(a)));
E2=symsum(E1,n,0,inf)

E2 =

Part-c

U1= n*(sym(a))^n;
U2=symsum(U1,n,0,inf)

U2 =

U3=(sym(a))/(1-(sym(a)))^2

U3 =

U4=symsum(U3,n,0,inf)

U4 =

9
Q1.27

Part-d

syms t
t1=-10:2;
t2=2:10;

m1=-10:0;
t=[t1 t2];

k1=zeros(1,13);
k3=ones(1,9);

k=[k1 k3];
f=[t1 t2]

f = 1×22
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2

plot(f,k);
axis([-10 10 -1 2 ]);

Q1.28

Part-a

n=[-10:10];

k= [-n];

stem(k,n);

10
11

You might also like