You are on page 1of 5

INSTITUTE OF BIOMEDICAL ENGINEERING & TECHNOLOGY

LIAQUAT UNIVERSITY OF MEDICAL AND HEALTH SCIENCES,


JAMSHORO
Subject: Signals & Systems Year: 3rd Term: 5th
Lab Handout – 04

Name: _________________________________ Roll No: ____________________

Score: __________ Signature of Tutor: ______________ Date:________________

To visualize complex exponential signal and real sinusoids

Lab Objective:
 To plot complex exponential signal
 To plot real sinusoids

Requirement:
MATlab 7.0 or later

Complex exponential signal: The “complex exponential” signal is one of most important
signals we study in signals and systems. It is fundamental to many forms of signal
representations and much of signal processing. The complex exponential is a complex valued
signal that simultaneously encapsulates both a cosine signal and a sine signal by posting them on
the real and imaginary components of the complex signal.

The continuous-time complex exponential signal (or complex sinusoid)


is defined as:

It may be expressed in Cartesian form using Euler's formula:

Euler's formula, named after Leonhard Euler, is a mathematical formula in complex analysis that
establishes the fundamental relationship between the trigonometric functions and the complex
exponential function. Where exp is the base of the natural logarithm, i is the imaginary unit, and
cos and sin are the trigonometric functions cosine and sine respectively.

Complex exponential signal in matlab:


To generate complex exponential signal, following command will be used in Matlab:

(A.^t).exp(-j*w*t)
Where
A= amplitude
w = fundamental frequency (measured in radians per second)
t= time
exp = exponential function
j = imaginary unit

Example # 01: generate a complex exponential function with amplitude 0.9 , frequency 2.
Plot its real and imaginary parts and also plot magnitude and phase

Program :

A = 0.9;
w = 2;
t = 0 : 0.1 : 20;
x = (A.^t).*exp(-1j*w*t);

subplot (221) ;
plot (t, abs(x),'linewidth',2) ;
grid on ;
xlabel(' time' );
ylabel('magnitude');
title (' Magnitude plot of x(t) , |x(t)|');

subplot (222) ;
plot (t, angle(x),'linewidth', 2) ;
grid on ;
xlabel('time');
ylabel('angle (radians)');
title ('phase plot of x(t) ');

subplot (223) ;
plot (t, real(x),'linewidth', 2) ;
grid on ;
xlabel('time');
ylabel('amplitude');
title ('real part of x(t) ');

subplot (224) ;
plot (t, imag(x),'linewidth', 2) ;
grid on ;
xlabel('time');
ylabel('amplitude');
title ('imaginary part of x(t) ');

2|Page
Example # 02: generate a complex exponential function in 3D

Program:
t= linspace(0,2.5, 250);
A= 1;
Sig=2;
Frequency = 2;
f= A* exp ((sig + 2*pi * frequency * 1i)*t);
figure (1);
plot3 (t, real(f), imag (f), ‘linewidth’, 2);
figure (2)
plot (t , real (f), ‘linewidth’, 2 );
figure(3)
plot (t, imag(f), ‘linewidth’2 );

3|Page
4|Page
Lab Tasks:
1. Follow example # 02 and write a matlab program to generate growing
exponential and decaying exponential in 3d in two separate figure windows. Also
plot their real parts and imaginary parts. Mention the grid on background,
mention x and y label and title name with your roll num.

your matlab program will show output similar to picture below

5|Page

You might also like