0% found this document useful (0 votes)
28 views3 pages

Experiment 4

Important questions

Uploaded by

mannammanikanta7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Experiment 4

Important questions

Uploaded by

mannammanikanta7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment 4

Transformation Operations on Signals (Folding, Time Shifting, Time


Scaling, Amplitude Scaling)
Aim: To perform various operations on signals like time reversal, shifting, scaling and
amplitude scaling.
Software Required: MATLAB
Procedure:
● Open MATLAB Software
● Open new M-file
● Type the program
● Save in current directory
● Run the program
● For the output see command window or figure window.

Theory:
Time reversal of signal is a very interesting operation applicable on both continuous and
discrete signals. Here in this case the vertical axis acts as the mirror, and the transformed
image obtained is exactly the mirror image of the parent signal. In this operation the signal
x (t) is folded around t=0 to obtain a folded sequence y ( t ) . It can be defined as y ( t ) =x ¿)
where x (t ) is the original signal.
Time shift is given by y ( t ) =x (t−t 0 ). When the shift constant t0 is positive, the effect
is to move the signal x (t ) to the right by t 0. In other words, each point on the signal x (t ) now
falls t0 later in time, so we call this transformation a time delay. Likewise, when it is negative,
we call it a time advance.
Time scaling is given by y ( t ) =x (at ). When the scaling factor a is greater than 1, the
effect is to “squeeze” the signal toward t=0 : an arbitrary point on x (t ) located at, say, t=t 1,
namely x (t 1), is now moved to the point t '1=t 1 / a on the resulting signal y ( t ) . y (t '1)=x ¿) =
x (a t 1 /a)=x (t 1). Since t '1 is closer to the vertical axis than t 1 is, this is called time
compression. When the factor a is between 0 and 1, we call it time expansion.
The process of rescaling the amplitude of a signal is known as amplitude scaling. In
the amplitude scaling operation on signals, the shape of the resulting signal remains same as
that of the original signal but the amplitude is altered. The amplitude scaling is given by
y (t )=A x (t). Where, A is a constant. If A>1, the signal is amplified and if A<1, the signal
is attenuated.
Program:

clc;
clear all;
close all;
t=-2:0.01:2;
x=(0<t&t<=1).*1+(1<t&t<=2).*(2-t);
a=input('Enter the time scaling factor:');
t0=input('Enter the time shift value:');
A=input('Enter the amplitude scaling factor:');
subplot(321)
plot(t,x)
xlabel('Time')
ylabel('Amplitude')
title('Original Signal')
ylim([-0.1 1.1])
subplot(322)
plot(-t,x)
xlabel('Time')
ylabel('Amplitude')
title('Time Reversal')
ylim([-0.1 1.1])
subplot(323)
plot(t/a,x)
xlabel('Time')
ylabel('Amplitude')
title('Time Scaling')
ylim([-0.1 1.1])
subplot(324)
plot(t+t0,x)
xlabel('Time')
ylabel('Amplitude')
title('Time Shifting')
ylim([-0.1 1.1])
subplot(325)
plot(t,A*x)
xlabel('Time')
ylabel('Amplitude')
title('Amplitude Scaling')
ylim([-0.1 1.1])
Output:
Enter the time scaling factor:2
Enter the time shift value:3
Enter the amplitude scaling factor:0.7

Original Signal Time Reversal


1 1
Amplitude

Amplitude
0.5 0.5

0 0
-2 -1 0 1 2 -2 -1 0 1 2
Time Time
Time Scaling Time Shifting
1 1
Amplitude

Amplitude

0.5 0.5

0 0
-1 -0.5 0 0.5 1 1 2 3 4 5
Time Time
Amplitude Scaling
1
Amplitude

0.5

0
-2 -1 0 1 2
Time

Result:

In this experiment various operations on signals have been performed using MATLAB.

You might also like