Page 95 - MATLAB an introduction with applications
P. 95
80 ——— MATLAB: An Introduction with Applications
(d) >>syms t x
>>f = t*sin(7*t);
>> laplace( f, x)
ans =
1/(x^2+49)*sin(2*atan(7/x))
(e) >>syms t x
>>f = 5*exp(–2*t)*cos(5*t);
>> laplace(f, x)
ans =
5*(x+2)/((x+2)^2+25)
(f ) >>syms t x
>>f = 3*sin(5*t+(pi/4));
>> laplace( f, x)
ans =
3*(1/2*x*2^(1/2)+5/2*2^(1/2))/(x^2 + 25)
(g) >>syms t x
>>f = 5*exp(–3*t)*cos(t–(pi/4));
>> laplace( f, x)
ans =
5*(1/2*(x + 3)*2^(1/2)+1/2*2^(1/2))/((x + 3)^2 + 1)
Example E1.34: Generate partial-fraction expansion of the following function:
10 ( + 7)( + 13)
s
s
5
() =
Fs 2 2
7 +
( +
7 +
s
ss 25)( + 55)(s + s 75)(s + s 45)
Solution:
Generate the partial fraction expansion of the following function:
numg=poly[–7 –13];
numg=poly([–7 –13]);
deng=poly([0 –25 –55 roots([1 7 75])' roots([1 7 45])' ]);
[numg,deng]=zp2tf (numg',deng',1e5);
Gtf=(numg,deng);
Gtf=tf(numg,deng);
G=zpk(Gtf);
[r,p,k]=residue(numg,deng)
r =
1.0e – 017*
0.0000
–0.0014
0.0254
–0.1871
0.1621
–0.0001
0.0000
0.0011
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09