PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

30 Practical MATLAB® Applications for Engineers


Note that the function sign(t) can be created by using the step functions indicated
as follows:

sign(t) = u(t) − u(−t) = − 1 + 2u(t)


R.1.100 The MATLAB symbolic toolbox calls the impulse function δ(t) by using the name
Dirac(t).


R.1.101 The MATLAB symbolic toolbox calls the step function u(t) by using the name
Heaviside(t).


R.1.102 The MATLAB symbolic toolbox calls the function sign(t) by using the name
signum(t).


R.1.103 Let us gain some experience by using the MATLAB symbolic toolbox in evaluat-
ing the following expressions:


a. δ()tdt
∞



b. ut dt() 
 2

3

c. sign t dt() 
∞



d. ut()t 3 
e. ut()t 2 

f. ∫tu t dt() 


g. tu t dt() 
1

2

h.  1 tu t dt() 

2

i.  1 tsign t dt() 

2

MATLAB Solution
>> syms t a
>> area _ impulse = int(‘Dirac(t)’, -inf, inf) % area of the impulse
δ(t)
area _ impulse =
1
>> area _ step = int(‘Heaviside(t)’, -2, 3) % area of the step
from –2 to +3

sign(t)

t

1

0
− 1

FIGURE 1.28
Plot of the function sign(t) of R.1.99.

Free download pdf