Beruflich Dokumente
Kultur Dokumente
------------------------------------------------------------------------------------------------------------------------------------------
Lab # 02
Reversing of signal:
Assume our independent variable representing the signal to be positive. It can be negative just by
multiplying it by negative number. That is, it results in the reflection of the signal along its
vertical axis of reference. As a result, the operation is aptly known as the time reversal or time
reflection of the signal.
Heaviside Command:
The Heaviside step function, or the unit step function, usually denoted by H or θ, is a
discontinuous function, named after Oliver Heaviside, whose value is zero for negative
arguments and one for positive arguments.
Heaviside: Heaviside step function
Syntax: heaviside(x)
Description: heaviside(x) returns the value 0 for x < 0, 1 for x > 0, and 1/2 for x = 0.
Sampling of signals:
y = unsample (x, n) increases the sample rate of x by inserting n – 1 zero between samples. If x is
a matrix, the function treats each column as a separate sequence. y = upsample (x, n, phase)
specifies the number of samples by which to offset the upsampled sequence.
y = upsample (x, n) increases the sample rate of x by inserting n – 1 zero between samples. If x is
a matrix, the function treats each column as a separate sequence.
Page |1
MCT-301 SIGNAL AND SYSTEM LAB MANUAL
------------------------------------------------------------------------------------------------------------------------------------------
Fliplr Command:
Fliplr: Flip array left to right
Syntax: B = fliplr(A)
Description: B = fliplr(A) returns A with its columns flipped in the left-right direction.
If A is a row vector, then fliplr(A) returns a vector of the same length with the order of its
elements reversed. If A is a column vector, then fliplr(A) simply returns A. For multidimensional
arrays, fliplr operates on the planes formed by the first and second dimensions.
Simulations:
Applying Time Shifting, Time scaling and Time reversing on a single function
Suppose that x(t)=te-t, -1 ≤ t ≤ 3. Plot the signal q(t)=x(1-2t)
Fig. 2.1 Function graph Fig. 2.2 Function graph time Scaling
Fig. 2.3 time reversing graph Fig. 2.4 time shifting graph
Page |2
MCT-301 SIGNAL AND SYSTEM LAB MANUAL
------------------------------------------------------------------------------------------------------------------------------------------
Fig. 2.5 shows plotting discrete time reversal Fig. 2.6 Time reveresal using fliplr
Fig. 2.8 Using simple commands show continous signal plotted in the form of unit step signal
INSTRUCTOR: S M UMAIR RASHEED
LECTURER
MECHATRONICS & CONTROL ENGG. DEPT.
Page |3
MCT-301 SIGNAL AND SYSTEM LAB MANUAL
------------------------------------------------------------------------------------------------------------------------------------------
Fig. 2.9 show continous signal plotted in the form of unit step signal using heaviside
Conclution:
After using the commands we are able to plot step functions and can scalwwe them
according to time.
Also learn the sampling of a function
Page |4