|
From: | Doug Stewart |
Subject: | Re: problem with residue and repeated complex roots |
Date: | Tue, 27 Nov 2007 20:42:34 -0500 |
User-agent: | Thunderbird 1.5.0.13 (Windows/20070809) |
I downloaded from http://velveeta.che.wisc.edu/cgi-bin/cvsweb.cgi/~checkout~/octave/scripts/polynomial/residue.m?rev=1.35;content-type=text%2Fplain and it does use mpoles.m but I still get
> [a b c]=residue(n,d)
ver = 1.35 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)To prove that I was using the new file and not an older file I added a line to print out the ver. number.
Please test this on your machine. Doug Stewart Doug Stewart wrote:
Thanks Doug Ben Abbott wrote:Doug,This problem was addressed with a change that made it into 2.9.16. If you check the cvs you can replace your residue.m with the one there. You'll need mpoles.m as well.I should also mention that another bug/feature was fixed just yesterday. Ben On Nov 27, 2007, at 5:11 PM, Doug Stewart wrote: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 resultsnn = 1dd = 1 8 42 104 169roots(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 _______________________________________________ Help-octave mailing list address@hidden https://www.cae.wisc.edu/mailman/listinfo/help-octave_______________________________________________ Help-octave mailing list address@hidden https://www.cae.wisc.edu/mailman/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |