help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with residue and repeated complex roots


From: Doug Stewart
Subject: problem with residue and repeated complex roots
Date: Tue, 27 Nov 2007 17:11:21 -0500
User-agent: Thunderbird 1.5.0.13 (Windows/20070809)

I am running qtoctave on windows XP octave version 2.9.15
residue doesn't give the correct answer for repeated complex roots

her is Matlab's result

» n
n =
    1
» d
d =
    1     8    42   104   169
» roots(d)
ans =
 -2.0000+ 3.0000i
 -2.0000- 3.0000i
 -2.0000+ 3.0000i
 -2.0000- 3.0000i
» [a b c]=residue(n,d)
a =
 1.0e+005 *
  1.2662+ 1.8232i
  1.2662- 1.8232i
 -1.2662- 1.8232i
 -1.2662+ 1.8232i
b =
 -2.0000+ 3.0000i
 -2.0000- 3.0000i
 -2.0000+ 3.0000i
 -2.0000- 3.0000i
c =
    []

and qtoctave's results

> n

n = 1

> d

d =

1 8 42 104 169

> roots(d)

ans =

-2.0000 + 3.0000i

-2.0000 - 3.0000i

-2.0000 + 3.0000i

-2.0000 - 3.0000i

> [a b c]=residue(n,d)

a =

-9.3613e-018 - 9.2593e-003i

-2.7778e-002 - 5.3894e-010i

2.3130e-018 + 9.2593e-003i

-2.7778e-002 + 5.3894e-010i

b =

-2.0000 + 3.0000i

-2.0000 + 3.0000i

-2.0000 - 3.0000i

-2.0000 - 3.0000i

c = [](0x0)



I haven't looked into why this is happening yet.

Doug Stewart



reply via email to

[Prev in Thread] Current Thread [Next in Thread]