Sei sulla pagina 1di 5

Generation of complex exponential, real exponential, sinusoidal and

random signals on MATLAB.


Roll #:_____________________________

OBJECTIVES:

 To study different types of exponential signals and implement on MATLAB.


 To generate Random signals on MATLAB.

TYPES OF SEQUENCES

REAL VALUED EXPONENTIAL SEQUENCE

𝒙[𝒏] = 𝑪. 𝒆𝒂.𝒏 (3-1)

Where “𝐶“ and “𝑎” are real . There are basically two types of behavior.
 If a is positive
As “n” increases “𝑥[𝑛]” is growing exponential, a form that describes different physical
processes including chain reactions and complex chemical reactions.
 If a is negative
As “n” increases “𝑥[𝑛]” is decaying exponential, a form that describes the radioactive
decay, RC circuits and damped mechanical systems.

COMPLEX VALUED EXPONENTIAL SEQUENCE


Complex exponential signal is defined as :

𝒙[𝒏] = 𝒆(𝝈+𝒋𝒘𝟎)𝒏 (3-2)

As “ σ + jwo ” represents a complex number. Such functions are used to describe


population growth as a function of generation and total return on investment as a
function of day, month etc.

SINUSOIDAL SIGNALS
Sinusoidal signal is defined as:

19
𝒙[𝒏] = 𝒄𝒐𝒔(𝒘𝒐 𝒏 + 𝜽) (3-3)

RANDOM SINGALS
Many practical signals can’t be described by mathematical expressions like those
explained above. Such sequences are called the random (or stochastic) sequences and
characterized by probability density function or statistical moments.

In Matlab we can generate two types of random sequences.


 RAND(1,N)
It generates a length N random sequences whose elements are uniformly distributed
between [0,1].
 RANDN(1,N)
It generates a length N Gaussian random sequence with mean 0, and variance 1.

PERIODIC SEQUENCE
A sequence x[n] is periodic if

𝒙[𝒏] = 𝒙[𝒏 + 𝑵]; ∀𝒏 (3-4)

The smallest integer that satisfies the above relation is called the fundamental period.

EVEN AND ODD SIGNALS


"x[n]"is an even signal if it is identical to its time-reversal counterpart i.e.

𝒙[−𝒏] = 𝒙[𝒏] (3-5)

Similarly the signal is referred to as odd if

𝒙[−𝒏] = −𝒙[𝒏] (3-6)

20
LAB TASK

TASK1: REAL EXPONENTIAL SEQUENCE

𝑥1[𝑛] = (0.9)𝑛1 ; 0 ≤ 𝑛1 ≤ 10

n1 = [0:10];
x1 = (0.9).^n1;

 Plot “ x1(n1)”.
 Label x-axis and y-axis.
 Also give title to the graph.

TASK2: COMPLEX VALUED EXPONENTIAL SEQUENCE

 Plot the following sequence.

𝒙𝟐(𝒏) = 𝒆𝒙𝒑(𝟐 + 𝟑𝒊)𝒏𝟐; 𝟎 ≤ 𝒏𝟐 ≤ 𝟏𝟎

 Write its MATLAB code below


TASK3: SINUSOIDAL SEQUENCE

 Plot the following sequence.


𝝅
𝒙𝟑[𝒏] = 𝟑𝒄𝒐𝒔 (𝟎. 𝟏𝝅𝒏𝟑 + ) + 𝟐𝒔𝒊𝒏(𝟎. 𝟓𝝅𝒏𝟑), 𝟎 ≤ 𝒏𝟑 ≤ 𝟏𝟎
𝟑

TASK4: GENERATION OF COMPLEX VALUED EXPONENTIAL SEQUENCE

% Generation of a complex exponential sequence

clc;

c = -(1/12)+(pi/6)*i;

K = 2;

n = 0:40;

x = K*exp(c*n);

subplot(2,1,1);

21
stem(n,real(x));

xlabel(‘Time index n’);ylabel(‘Amplitude’);

title(’Real part’);

subplot(2,1,2);

stem(n,imag(x));

xlabel(‘Time index n’);ylabel(‘Amplitude’);

title(‘Imaginary part’);

TASK5: GENERATION OF REAL EXPONENTIAL SIGNAL

% Generation of a real exponential sequence

clc;

n = 0:35; a = 1.2; K = 0.2;

x = K*a.^+n;

stem(n,x);

xlabel(‘Time index n’);ylabel(‘Amplitude’);

TASK6: RANDOM SIGNAL GENERATION

n = [0:40];
x1 = rand(1,41);

stem(n,x1)

 Plot “ x1(n1)”.
 Label x-axis and y-axis.
 Also give title to the graph.

LAB ASSIGNMENT
P.1

Generate a random sequence of numbers upto 40 numbers of samples , called x1, then
multiply it with sin(n), and plot the result.

22
P.2

Generate the signal

𝒙(𝒏) = 𝒔𝒊𝒏(𝒏)𝒆(−𝟒𝝅𝒏) , 𝟎 ≤ 𝒏 ≤ 𝟏𝟎

Show the result graphically.

23

Potrebbero piacerti anche