I think I have found another problem in residue.
Ben Abbott
bpabbott at mac.com
Sun Dec 9 13:50:34 CST 2007
On Dec 9, 2007, at 2:20 PM, Doug Stewart wrote:
> Ben Abbott wrote:
>>
>> On Dec 9, 2007, at 12:23 PM, Doug Stewart wrote:
>>
>>>
>>>
>> Doug, I took your example and modified it slightly. Please see the
>> attached test script. The script displays [r, p]
>>
>> I've run the script from Octave on Tiger/PPC and Leopard/Intel, as
>> well as on Matlab 7.3b. In each case I get the same results (except
>> that matlab appears to refine the roots a bit better).
>>
>> ---------------------------
>> octave:30> test
>> ans =
>>
>> -1.31921 + 0.00000i -5.60000 + 0.00000i
>> -3.79336 + 8.39318i -2.99998 + 3.00009i
>> 14.55944 + 10.64154i -3.00008 + 2.99997i
>> 16.35697 - 13.24746i -2.99994 + 2.99994i
>> -3.79336 - 8.39318i -2.99998 - 3.00009i
>> 14.55944 - 10.64154i -3.00008 - 2.99997i
>> 16.35697 + 13.24746i -2.99994 - 2.99994i
>> 8.90592 - 0.00000i -1.00000 + 0.00000i
>> ---------------------------
>>
>> The Matlab result is
>>
>> ---------------------------
>> >> test
>> ans =
>> -1.3195 -5.6000
>> -3.7929 + 8.3933i -3.0000 + 3.0000i
>> 14.5590 +10.6397i -3.0000 + 3.0000i
>> 16.3510 -13.2508i -3.0000 + 3.0000i
>> -3.7929 - 8.3933i -3.0000 - 3.0000i
>> 14.5590 -10.6397i -3.0000 - 3.0000i
>> 16.3510 +13.2508i -3.0000 - 3.0000i
>> 8.9054 -1.0000
>> ---------------------------
>>
>> It appears to me that Octave and Matlab's residue.m script work in
>> compatible/consistent ways ... hmmm, perhaps I've misinterpreted
>> your point?
>>
>> I'm on a tight schedule today, so I don't have time for doing a
>> derivation by hand to verify the results. My presence online will
>> be spotty for the next few days, but will check back when I can.
>>
>> Ben
>>
> OK! Then the problem is at my end.
>
> I agree that this is a good answer from residue.
> Doug Stewart
Doug,
I'm curious, what version of Octave are you presently running, and on
what platform?
Ben
More information about the Help-octave
mailing list