You are on page 1of 1

1 % NAME : Sayali K.

Makode
2 2 %ROLL NO :70
3
4 clc;
5 clear all;
6 close all;
7 %for unit impulse signal before time scaling
8 t=[-10:1:10];
9 x=[zeros(1,10) 1 zeros(1,10)];
10 figure,
11 subplot(2,2,1),plot(t,x)
12 title('inpulse signal');
13 xlabel('time');
14 ylabel('amplitude');
15 subplot(2,2,2),stem(t,x)
16 title('impulse signal');
17 xlabel('time');
18 ylabel('amplitude');
19 % for time scaling unit impulse signal
20 t1=2*t;
21 subplot(2,2,3),plot(t1,x)
22 title('time scaling inpulse signal');
23 xlabel('time');
24 ylabel('amplitude');
25 subplot(2,2,4),stem(t1,x)
26 title('inpulse signal');
27 xlabel('time');
28 ylabel('amplitude');
29 %for unit step before scaling 30 t=[-10:1:10];
31 x=[zeros(1,10) 1 ones(1,10)];
32 figure,subplot(2,2,1),plot(t,x)
33 title('step signal');
34 xlabel('time');
35 ylabel('amplitude');
36 subplot(2,2,2),stem(t,x)
37 title('step signal');
38 xlabel('time');
39 ylabel('amplitude');
40 %for time scaling unit step
41 t2=2*t;
42 subplot(2,2,3),plot(t2,x);
43 title('time scaling step signal');
44 xlabel('time');
45 ylabel('amplitude');
46 subplot(2,2,4),stem(t2,x);
47 title('time scaling step signal');
48 xlabel('time');
49 ylabel('amplitude');

You might also like