[Scilab-users] partial fractions
Federico Miyara
fmiyara at fceia.unr.edu.ar
Fri Jul 16 21:11:48 CEST 2021
Dear All,
I'm wonderig whether there is a standard method to obtain the partial
fraction expansion of a rational function.
Searching, I've found the function pfss(), which purportedly is meant
for that, but I find it doesn't give a complete solution. For instance:
// Poles and zeros
p = [-8:-1];
z = [0 0 0 0];
// Numerator and denominator
N = prod(%s - z)
D = prod(%s - p)
// Rational function
H = N/D
// Partial fractions
HH = pfss(H)
The result is
HH =
HH(1)
-8 -5.7428571s -3.9515873s² +0.2960317s³ -0.0946429s⁴ -0.006746s⁵
-0.0001984s⁶
------------------------------------------------------------------------------
40320 +69264s +48860s² +18424s³ +4025s⁴ +511s⁵ +35s⁶ +s⁷
HH(2)
0.0001984
---------
1 +s
The second component in the list is indeed one of the partial fractions,
but the first one is not an irreductible version. Computing HH(1) +
HH(2) yields H with good approximation.
I guess I could proceed iteratively with HH(1), but it would be nice to
have a function performing this automatically. I couldn't find such a
function
Regards,
Federico Miyara
--
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210716/ae1f21e5/attachment.htm>
More information about the users
mailing list