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 evaluating the following expressions:
a.
δ( )
t dt ϭ
Ϫ∞
∞
∫
b.
u t dt
( ) ϭ
Ϫ2
3
∫
c.
sign t dt
( ) ϭ
Ϫ∞
∞
∫
d. u t t
( ) ϭ ϭ
3
e. u t t
( ) ϭ ϭ
Ϫ2
f. t u t dt
( ) ϭ
∫
g.
t u t dt
( ) ϭ
1
2
∫
h.
t u t dt
( ) ϭ
Ϫ1
2
∫
i.
t sign t dt
( ) ϭ
Ϫ1
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.
CRC_47760_CH001.indd 30
CRC_47760_CH001.indd 30
7/25/2008 4:16:16 PM
7/25/2008 4:16:16 PM
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 evaluating the following expressions:
a.
δ( )
t dt ϭ
Ϫ∞
∞
∫
b.
u t dt
( ) ϭ
Ϫ2
3
∫
c.
sign t dt
( ) ϭ
Ϫ∞
∞
∫
d. u t t
( ) ϭ ϭ
3
e. u t t
( ) ϭ ϭ
Ϫ2
f. t u t dt
( ) ϭ
∫
g.
t u t dt
( ) ϭ
1
2
∫
h.
t u t dt
( ) ϭ
Ϫ1
2
∫
i.
t sign t dt
( ) ϭ
Ϫ1
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.
CRC_47760_CH001.indd 30
CRC_47760_CH001.indd 30
7/25/2008 4:16:16 PM
7/25/2008 4:16:16 PM
