- #1
OctaveNoob
- 1
- 0
So I'm trying to figure out how to decompose the following using octave:
85000/[(s^2+250^2)(0.2s^2+40s+10000)]
I tried using the residue command but I think that only works if the polynomials have real roots, which these don't. When I do use residue I get the following:
b =
2.0000e-01 4.0000e+01 2.2500e+04 2.5000e+06 6.2500e+08
octave:29> [r p k e] = residue(85000,b)
r =
-0.016000 + 0.004000i
-0.016000 - 0.004000i
0.016000 - 0.013000i
0.016000 + 0.013000i
p =
0.00 + 250.00i
-0.00 - 250.00i
-100.00 + 200.00i
-100.00 - 200.00i
k = [](0x0)
e =
1
1
1
1
<b> being (s^2+250^2)(0.2s^2+40s+10000) only expanded
The answer I get using wolfram, which is correct, is:
(1.68+0.0064 s)/(10000.+40. s+0.2 s^2)+(-2.-0.032 s)/(62500.+1. s^2)
Is there any way I can get octave/matlab to decompose it into like that ^^^^
Or better yet, is there a way I can deduce that ^^^^^ from the answer octave/matlab gives me?
Thanks for any help, if you need clarification just ask.
85000/[(s^2+250^2)(0.2s^2+40s+10000)]
I tried using the residue command but I think that only works if the polynomials have real roots, which these don't. When I do use residue I get the following:
b =
2.0000e-01 4.0000e+01 2.2500e+04 2.5000e+06 6.2500e+08
octave:29> [r p k e] = residue(85000,b)
r =
-0.016000 + 0.004000i
-0.016000 - 0.004000i
0.016000 - 0.013000i
0.016000 + 0.013000i
p =
0.00 + 250.00i
-0.00 - 250.00i
-100.00 + 200.00i
-100.00 - 200.00i
k = [](0x0)
e =
1
1
1
1
<b> being (s^2+250^2)(0.2s^2+40s+10000) only expanded
The answer I get using wolfram, which is correct, is:
(1.68+0.0064 s)/(10000.+40. s+0.2 s^2)+(-2.-0.032 s)/(62500.+1. s^2)
Is there any way I can get octave/matlab to decompose it into like that ^^^^
Or better yet, is there a way I can deduce that ^^^^^ from the answer octave/matlab gives me?
Thanks for any help, if you need clarification just ask.