PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

18 Practical MATLAB® Applications for Engineers


The fi rst members of the Hermitian family are indicated as follows:


Her 1 = te−t^2/4


Her 2 = (t^2 − 1) e−t^2/4


Her 3 = (t^3 − 3t) e−t^2/4


Her 4 = (t^4 − 6t^2 + 3) e−t^2/4


R.1.49 The polynomial factors in the expressions defi ned by Hern are referred as the Her-
mitian polynomials, and the orthogonal interval is over the range −∞ ≤ t ≤ +∞. The
script fi le Hermite, given as follows, returns the plots of the fi rst fi ve members of the
Hermite’s family, over the range − 5 ≤ t ≤ + 5 , in Figure 1.18.


MATLAB Solution
% Script file: Hermite
t =-5:.1:5;
Her _ 0 = exp(-t.^2./4);
Her _ 1 = t.*exp(-t.^2./4);
Her _ 2 = (t.^2-1).*exp(-t.^2./4);
Her _ 3 = (t.^3-3.*t).*exp(-t.^2./4);
Her _ 4 = (t.^4-6*t.^2+3).*exp(-t.^2./4);
p l o t(t,H e r _ 0,’*:’,t,H e r _ 1,’d -.’,t,H e r _ 2,’h --’,t,H e r _ 3,’s-’,t,H e r _ 4,’p:’)
xlabel(‘time’)
ylabel(‘ Amplitude’)
title(‘First five members of the Hermite family’)
legend(‘Her 0’,’Her 1’,’Her 2’,’Her 3’,’Her 4’)

First five members of the Hermite family
4

3

2

1

0

− 1

− 2

− 3

− 4
− 5 − 4 − 3 − 2 − 1 01234 5
time

Her 0
Her 1
Her 2
Her 3
Her 4

Amplitude

FIGURE 1.18
(See color insert following page 374.) Plots of the Hermite family of R.1.49.

Free download pdf