Page 91 - MATLAB an introduction with applications
P. 91
76 ——— MATLAB: An Introduction with Applications
Solution:
The MATLAB program for determining the partial fraction expansion is given below:
>> b = [0 0 0 0 1];
>> a = [1 5 7 0 0];
>> [r, p, k] = residue (b, a)
r =
0.0510 –0.0648i
0.0510 +0.0648i
–0.1020
0.1429
p =
–2.5000 + 0.8660i
–2.5000 – 0.8660i
0
0
k = [ ]
% From the above MATLAB output, we have the following expression:
r r r r
Fs 1 + 2 + 3 + 4
() =
s − p 1 s − p 2 s − p 3 s − p 4
−
+
0.0510 0.0648i 0.0510 0.0648i –0.1020 0.1429
() =
Fs + + +
s −− + i s −− − i s − 0 s − 0
( 2.5000 0.8660 )
( 2.5000 0.8660 )
% Note that the row vector k is zero implies that there is no constant term in this example problem.
% The MATLAB program for determining the inverse Laplace transform of F(s) is given below:
>> syms s
>> f = 1/(s^4 + 5*s^3 + 7*s^2);
>> ilaplace ( f )
ans =
1/7*t–5/49+5/49*exp (–)*cos (1/2*3^ (1/2)*t) +11/147*exp (–5/2*t)*3^
(1/2)*sin(1/2*3^(1/2)*t)
Example E1.30: Expand the following function F(s) into partial fractions using MATLAB. Determine the
inverse Laplace transform of F(s).
3 +
5s 2 + s 6
F(s) =
3 +
9 +
s 4 + s 3 7s 2 + s 12
Solution:
The MATLAB program for determining the partial fraction expansion is given below:
>> b = [0 0 5 3 6];
>> a = [1 3 7 9 12];
>> [r, p, k] = residue(b, a)
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09