Why does the Residue function returns complex coefficients of a rational function....??

Hi
Even though I ensured that all my poles ,residues are complex conjugate pairs and the direct term is real, the residue function returns complex coefficients. May I know the reason why this is happening in matlab.
For eg:
Poles=[ -0.297252868065168 - 11.6108351815607i -0.297252868065168 + 11.6108351815607i -19.9444674513931 - 8.76592887488931i -19.9444674513931 + 8.76592887488931i -8.52965151869893 - 23.6423888144931i -8.52965151869893 + 23.6423888144931i];
Res=[ -0.219160922557423 + 0.314530473001705i -0.219160922557423 - 0.314530473001705i 3.62282522955231 + 177.563841204173i 3.62282522955231 - 177.563841204173i -4.53489652493515 - 28.5303076418931i -4.53489652493515 + 28.5303076418931i];
Direct_term=0.00210679058580560;
[b a]=residue(Res,Poles,Direct_term);
Why am I getting complex co-eff in 'b' ?? Please let me know asap....
Thanks Venu

답변 (1개)

the cyclist
the cyclist 2011년 10월 15일
Looks to me that the imaginary parts are tiny, and are just computer round-off error.

댓글 수: 4

For the problem i stated above itz tiny but when i have 7 complex conjugate pairs I have significant imaginary number..
Poles=[
-0.235595796828570 - 7.51689426974672i
-0.235595796828570 + 7.51689426974672i
-0.781740831997082 - 8.52857663770894i
-0.781740831997082 + 8.52857663770894i
-0.944616475393567 - 10.2878136072271i
-0.944616475393567 + 10.2878136072271i
-3.08711512408251 - 9.90142234678996i
-3.08711512408251 + 9.90142234678996i
-0.297252868065168 - 11.6108351815607i
-0.297252868065168 + 11.6108351815607i
-19.9444674513931 - 8.76592887488931i
-19.9444674513931 + 8.76592887488931i
-8.52965151869893 - 23.6423888144931i
-8.52965151869893 + 23.6423888144931i];
Res=[
0.281061150197145 + 0.0578568842439584i
0.281061150197145 - 0.0578568842439584i
1.37371769852477 + 0.507158376975511i
1.37371769852477 - 0.507158376975511i
-0.0439844443484282 + 2.27379994030156i
-0.0439844443484282 - 2.27379994030156i
-5.70758424642157 - 21.3783127156549i
-5.70758424642157 + 21.3783127156549i
-0.219160922557423 + 0.314530473001705i
-0.219160922557423 - 0.314530473001705i
3.62282522955231 + 177.563841204173i
3.62282522955231 - 177.563841204173i
-4.53489652493515 - 28.5303076418931i
-4.53489652493515 + 28.5303076418931i];
Direct_term=0.00210679058580560;
[b a]=residue(Res,Poles,Direct_term);
Check this.. itzz more significant...
It would help if you could show the actual outputs you get. People do not always have MATLAB handy to run tests with at the time they are reading questions.
The below are the numerator coefficients which is the output of the above code
b=[
0.00210679058580560 + 0.00000000000000i
-10.3135389504971 + 0.00000000000000i
669.131286493158 + 0.00000000000000i
-28627.7202535250 + 0.00000000000000i
734688.410571537 + 0.00000000000000i
-13659002.1713074 + 0.00000000000000i
245090589.254096 + 4.76837158203125e-07i
-2729141300.24354 + 7.62939453125000e-06i
37871334625.4884 - 7.62939453125000e-06i
-268822943451.791 + 0.00146484375000000i
3021233412244.70 + 0.00000000000000i
-12880358576851.8 - 0.0312500000000000i
120988980636702 + 0.125000000000000i
-239081416369462 - 0.437500000000000i
1.92634225464627e+15 + 1.75000000000000i];
please help
venu, when I run that code, I get that the largest imaginary part is 15 orders of magnitude smaller than the largest real part. I still believe this is roundoff error.
If you need better that this, then maybe you need to solve this analytically, and not numerically. I don't know for sure, but maybe the Symbolic Math Toolbox handles this.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2011년 10월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by