PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Fourier and Laplace 365


R.4.117 For example, using the symbolic MATLAB toolbox obtain the ILT of the following
frequency-dependent functions (F1 through F7 of R.4.115):
a. F1 = 1/(s − 1)
b. F2 = 1/(s − 1)^2
c. F3 = s/(s^2 + 1)
d. F4 = 1/(s^2 + 1 )
e. F5 = 5040/s^8
f. F6 = 1/s
g. F7 = (1/s) −e−s/s

MATLAB Solution
>> syms s t
>> F1=1/(s-1)
>> f1 = ilaplace(F1)
f1 =
exp(t)
>> F2 = 1/(s-1)^2;
>> f2 = ilaplace(F2)
f2 =
t*exp(t)
>> F3 = s /(s^2+1);
>> f3 = ilaplace(F3)
f3 =
cos(t)
>> F4 =1/(s^2+1);
>> f4 = ilaplace(F4)
f4 =
sin(t)
>> F5 = 5040/s^8;
>> f5 = ilaplace(F5)
f5 =
t^7
>> F6 = 1/s;
>> f6 = ilaplace(F6)
f6 =
1
>> F7 = 1/s-e-s/s;
>> f7 = ilaplace(F7)
f7 =
1-Heaviside(t-1)
R.4.118 Let us now illustrate the power of MATLAB by solving again the four Example
problems of R.4.98, using MATLAB, given below by the script fi le solve_DE.
Recall that the examples of R.4.98 were solved by hand. Compare the results, as
well as the labor involved in each process.

MATLAB Solution
% Script file: solve _ DE
syms s t ft Fsa ftb Fsb ftc Fsc yt Y
Free download pdf