You are on page 1of 2

ASSIGNMENT # 03

Statement:
Plot the modified signals e(t)= =2/3 *c(t)*(u(t+2)-u(t)) + cos(2*pi*t)*(u(t)-u(t-2))
Remember to properly label your axes and figure.Use signal c(t) from Assignment
2

Source Code:
t = -3:0.01:3;
unitstep = t>-1 & t<1; %signal b(t)

u1=t>-2 & t<0 ; %signal u(t+2)-u(t)


u2=t>0 & t<2; %signal u(t)-u(t-2)

t=2*t-1;
d=1+unitstep;%signal d(t)=1+b(t-1)

t1 = -3:3;
tri = [0 0 1 2 1 0 0];% signal a(t)

t1=t1-1;
c=(3/2)*tri ; % signal c(t)=3/2 a(t+1)

x=(2/3)*c; %2/3 *c(t)*u(t+2)-u(t)


x=[1 2 1];
t3=-2:0;
plot(t3,x),
hold on

t2=0:0.01:2
plot(t2,y);
title('signals e(t)');
xlabel('time (s)-------->');
ylabel('e(t)=2/3 *c(t)*(u(t+2)-u(t)) + cos(2*pi*t)*(u(t)-u(t-
2))----->');
Output Screenshot:

You might also like