PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

364 Practical MATLAB® Applications for Engineers


R.4.115 The following examples illustrate the procedure used to obtain the LT of the stan-
dard time functions (signals or systems) using the symbolic MATLAB toolbox.
Obtain the LT of the following time-dependent functions, and compare the
results with the transforms of Table 4.2.
a. f1(t) = exp(t)
b. f2(t) = t exp(t)
c. f3(t) = cos(t)
d. f4(t) = sin(t)
e. f5(t) = t^7
f. f6(t) = u(t)
g. f7(t) = pul(t/2)


MATLAB Solution
>> syms s t x ;
>> F1 = laplace(exp(t)) % part (a)
F1 =
1/(s-1)

>> F2 = laplace(t*exp(t)) % part (b)
F2 =
1/(s-1)^2

>> F3 = laplace(cos(t)) % part (c)
F3 =
s/(s^2+1)

>> F4 = laplace(sin(t)) % part (d)
F4 =
1/(s^2+1)

>> F5 = laplace(t^7) % part (e)
F5 =
5040/s^8

>> F6 = laplace(sym(‘Heaviside(t)’)) % part (f)
F6 =
1/s

>> F7 = laplace(sym(‘Heaviside(t+1)’)
-sym(‘Heaviside(t-1)’)) % part(g)
F7 =
1/s-exp(-s)/s

Note that the transforms obtained using the symbolic MATLAB toolbox fully
agree with the transforms of Table 4.2.


R.4.116 The MATLAB function f = ilaplace(F), where F is a symbolic expression with inde-
pendent variable s, returns the ILT of F, denoted by f which is a function of t,
denoted by F(s) → f(t).

Free download pdf