You are on page 1of 2

Lab 5

Exercise 3

t = -4:0.001:4;
y = mysignal2(t);

subplot(2,2,1);

plot(t,y,'r');
hold on;
plot(t,2*y,'b');
plot(t,y/2,'y');
axis square
hold off;
grid on,xlabel ('t'),ylabel('y(t)'), title('y(t), 2*y(t),
y(t)/2'),legend ('y(t)','2*y(t)','y(t)/2')

subplot(2,2,2)
plot(t,y,'r');
hold on;
plot(t*2,y,'b');
plot(t/2,y,'y');
grid on,xlabel ('t'),ylabel('y(t)'), title('y(t), y(t*2),
y(t/2)'),legend ('y(t)','y(t*2)','y(t/2)')

subplot(2,2,3)
plot(t,y,'r');
hold on;
plot(t,-y,'b');
plot(-t,y,'y');
grid on,xlabel ('t'),ylabel('y(t)'), title('y(t), -y(t), y(-
t)'),legend ('y(t)','-y(t)','y(-t)')

subplot(2,2,4)
plot(t,y,'r');
hold on;
plot(t-1,y,'b');
plot(t+1,y,'y');
grid on,xlabel ('t'),ylabel('y(t)'), title('y(t), y(t-1), y(t
+1)'),legend ('y(t)','y(t-1)','y(t+1)')

1
Published with MATLAB R2015a

You might also like