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

Assignment No.

2
Signals and Systems;

Name; Abdurrahman Khan


Roll no; i13-0446
Section; D

Q2.27
b)syms

t p1 p2;

p1=sin(t)/t;
p2=int(p1,-inf,inf);
ezplot(p1);

Due to finite output, we ca say that it has BIBO stability.


sin(t)/t
1
0.8
0.6
0.4
0.2
0
-0.2
-6

-4

-2

0
t

Q2.28
a)
t=0:0.01:100;
x=20*(heaviside(t)-heaviside(t-40))-(10).*(heaviside(t-40)-heaviside(t-60));
plot(t,x);

20

15

10

-5

-10

10

20

30

40

50

60

70

80

90

100

x(t)
t=0:0.01:100;
x=(20)*(heaviside(t)-heaviside(t-40))-10.*(heaviside(t-40)-heaviside(t-60));
z=(1.1)*(-abs(x))
y=(x+z).*cos(2*pi*t);
plot(t,y);
25
20
15
10
5
0
-5
-10
-15
-20
-25

10

20

30

40

50

60

70

80

90

100

b)
t=0:.01:100;
x=20*(heaviside(t)-heaviside(t-40))-10.*(heaviside(t-40)-heaviside(t-60));
z=(1.1)*(-abs(a));
y=abs((x+z).*cos(2*pi*t));

plot(t,y);
25

20

15

10

10

20

30

40

50

60

70

80

90

c)

100

t=0:.01:100;
x=(20)*(heaviside(t)-heaviside(t-40))-10.*(heaviside(t-40)-heaviside(t-60));
y=abs(x);
z=exp((-0.8)*t).*(heaviside(t));
v=conv(z,y)*(0.01);
plot(v);
30

25

20

15

10

0.5

1.5

2.5
4

x 10

d)
t=0:.01:100;
x=2*cos(.2*pi*t);
y=(-abs(x))

z=((x+y).*cos(10*pi*t));
plot(t,z)

4
3
2
1
0
-1
-2
-3
-4

10

20

30

40

50

Q2.29
a)
syms t x w y z
x=cos(t);
w=int(cos(t),0,10)
y=cos((2*pi*t)-(20*pi*a));
z=cos(2*pi*t-2*pi*a);
ezplot(x,0:0.01:10);
hold on;
ezplot(y,0:0.01:10);
ezplot(z,0:0.01:10);
legend('x(t)','z(t)','y(t)');

b)

60

70

80

90

100

syms x t y
x=@(t)heaviside(t);
y=@(t)(a(t)-a(-t));
ezplot(y,-10:1:10);

(a(t)-a(-t))
1

0.5

-0.5

-1
-10

-8

-6

-4

-2

0
t

10

b)
syms a t y w z
a=@(t)heaviside(t);
y=@(t)(a(t)-a(-t));
w=int(y(t),0,10);
z=cos(2*pi*t-2*pi*w);
ezplot(z,-10:1:10);
cos(2 t)
1

0.5

-0.5

-1
-10

-8

-6

-4

-2

0
t

10

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
Lab#07
Q.2
syms t u T r z h x x2 y1 y2 x3 y3 ;
u= @(t) heaviside(t);
r= @(t) t.*u(t);
x= @(t) cos(2*pi*t).*(u(t)-u(t-20));
subplot(331);
ezplot(x);
z= @(t) exp(-2*t).*u(t);
subplot(332);
ezplot(z);
y1= @(t) int (x(T).*z(t-T),T,0,t);
subplot(333);
ezplot(y1);
x2= @(t) sin(pi*t).*exp(-20*t).*(u(t)-u(t-20));
subplot(334);
ezplot(x2);
h=@(t) exp(-2*t).*u(t);
subplot(335);
ezplot(h);
y2=@(t) int (x2(T).*h(t-T),T,0,t);
subplot(336);
ezplot(y2);
x3= @(t) r(t)-2*r(t-2)+r(t-4);
subplot(337);
ezplot(x3);
h=@(t) exp(-2*t).*u(t);
subplot(338);
ezplot(h);
y3=@(t) int (x3(T).*(h(t-T),T,0,t));
subplot(339);
ezplot(y3);

cos(2 t) (u(t)-u(t-20))
1

0.5

-1

0.1
0
-0.1
0

sin( t) exp(-20 t) (u(t)-u(t-20))


1
0.06
0.04
0.5
0.02
0
0
0
0.1 0.2
0
t
r(t)-2 r(t-2)+r(t-4)
2

0.5

2
t

int(x 1(T) h(t-T),T,0,t)

exp(-2 t) u(t)

4
6
t
int(x-3(T) h(t-T),T,0,t)
x 10 2

exp(-2 t) u(t)

3
2
1
0
-0.02 0 0.020.040.06
t
int(x 3(T) h(t-T),T,0,t)

exp(-2 t) u(t)

0.8
0.6
0.4
0.2
0

Q.3
syms a b c t y;
x=@(t) heaviside(t)-heaviside(t-1);
y=int(x(t),t,0,t);
ezplot(y,0:1:10);

t heaviside(t) - heaviside(t - 1) (t - 1)

1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0

b)zero.
c)
syms t y;
x=@(t) cos((2*pi*t));

5
t

10

y=1/t.*int(x(t),0,t);
ezplot(y,0:0.001:2)

sin(2 t)/(2 t)
1
0.8
0.6
0.4
0.2
0
-0.2
0

0.2

0.4

0.6

0.8

1
t

1.2

1.4

1.6

1.8

You might also like