Expanding and Inversion) On Signals
Expanding and Inversion) On Signals
: 04
Lab. Objective: To practically apply the properties of signals (shifting, scaling, compressing,
expanding and inversion) on signals.
Shifting of signal
Shifting of signal is to give a shift to the signal either on right side or on left side.
t=0:.001:10;
y=2*cos(t);
plot(t-1,y)
1.5
0.5
-0.5
-1
-1.5
-2
-1 0 1 2 3 4 5 6 7 8 9
y=4*sin(t);
plot(t+2,y)
-1
-2
-3
-4
2 3 4 5 6 7 8 9 10 11 12
Inversion Of signal
%% Inversion of signal%%
t=0:.01:10;
y=-sin(t);
plot(t,y)
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 1 2 3 4 5 6 7 8 9 10
t=0:.01:10;
y=10*sin(t);
plot(t,y)
10
-2
-4
-6
-8
-10
0 1 2 3 4 5 6 7 8 9 10
t=0:.01:10;
y=1/6*sin(t);
plot(t,y)
0.2
0.15
0.1
0.05
-0.05
-0.1
-0.15
-0.2
0 1 2 3 4 5 6 7 8 9 10
Expanding of signals
%% Expanding of signal%%
t=0:.01:10;
y=4*sin(t);
plot(3*t,y)
-1
-2
-3
-4
0 5 10 15 20 25 30
Compressing of signals
%% Compressing of signal%%
t=0:.01:8;
plot(t/12,y)
-1
-2
-3
-4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
Flipping of signals
Flipping of signal is to change the time axis of a signal from positive X-axis to negative x-axis OR from
negative x-axis to positive x-axis.
t=0:.01:8;
y=9*cos(t);
plot(-t,y)
10
-2
-4
-6
-8
-10
-8 -7 -6 -5 -4 -3 -2 -1 0
t=-8:.01:0;
y=9*cos(t);
plot(-t,y)
10
-2
-4
-6
-8
-10
0 1 2 3 4 5 6 7 8
t=0:.01:6;
y1=9*cos(t);
%Defining the second waveform
y2=2*sin(t)
y3=y1+y2;
plot(t,y3)
10
-2
-4
-6
-8
-10
0 1 2 3 4 5 6
t=0:.01:6;
y1=9*cos(t);
y2=11*sin(t)
y3=y1-y2;
plot(t,y3)
10
-5
-10
-15
0 1 2 3 4 5 6
t=0:.01:6;
y1=2/3*cos(t);
y2=5*sin(t)
y3=y1.*y2;
plot(t,y3)
1.5
0.5
-0.5
-1
-1.5
-2
0 1 2 3 4 5 6
y1=2/3*cos(t);
y2=5*sin(t)
y3=y1./y2;
plot(t,y3)
20
-20
-40
-60
-80
-100
0 1 2 3 4 5 6
Lab Assignment:
Y=A/Bcos(2t-3/A)+C*D^Etan(-t/E+2)