PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

72 Practical MATLAB® Applications for Engineers


Example 1.12

The set of signals given by

f(t) = ejnwot for n = 0 , ± 1 , ± 2 , ..., ±∞


constitutes an orthogonal family for any arbitrary wo (where wo is referred to as the
fundamental frequency, see Chapter 4 for more details), over the time interval given by
T = 2 π/wo, if the following relation is satisfi ed:

exp( ).exp( )

/
/

/
jnw t jm t dt

wnm
nm

oo
w

w o

o

o



w
 

 




2
0

for
for

Create the MATLAB script fi le ortog that verifi es the preceding relation for the following
arbitrary values of wo , n, and m:

a. wo = 2 , n = 5 , and m = 5
b. wo = 2 , n = 5 , and m = 6
c. wo = 7 , n = 8 , and m = 10
d. wo = 7 , n = 10 , and m = 10

MATLAB Solution
% Script file: ortog
syms check _ a check _ b check _ c check _ d expon t ;
expon = exp(j*5*2*t)*exp(-j*5*2*t);%wo=2,n=5,m=5
check _ a = int(expon,-pi/2,pi/2);
% f = vpa(check _ a)
expon = exp(j*5*2*t)*exp(-j*6*2*t);%wo=2,n=5,m=6
check _ b = int(expon,-pi/2,pi/2);
expon = exp(j*8*7*t)*exp(-j*10*7*t);%wo=7,n=8,m=10
check _ c = int(expon,-pi/7,pi/7);
expon = exp(j*10*7*t)*exp(-j*10*7*t);%wo=7,n=10,m=10
check _ d = int(expon,-pi/7,pi/7);
disp(‘****************RESULTS***********************************’)
disp(‘The results for parts (a),(b),(c) and (d) are given by :’)
results = [check _ a check _ b check _ c check _ d];
disp(results)
disp(‘***********************************************************’)

Back in the command window the script fi le ortog is executed and the results are
shown as follows:

>> ortog

************************* RESULTS ****************************
The results for parts (a), (b), (c) and (d) are given by:
[ pi, 0, 0, 2/7*pi ]
***************************************************************

Observe that the results obtained clearly confi rm that the exponential family of func-
tions, given by f(t) = ejnwot, for n = 0 , ± 1 , ± 2 , ..., ±∞ constitute an orthogonal family.
Free download pdf