[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: residue() confusion
From: |
Henry F. Mollet |
Subject: |
Re: residue() confusion |
Date: |
Sat, 22 Sep 2007 14:16:16 -0700 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
N.B. It should be residue.m not residual.m and it's residue.m that I had
tried to correct.
on 9/22/07 2:05 PM, Henry F. Mollet at address@hidden wrote:
> The result for e should be [1 2 1 2] (multiplicity for both poles). Note
> that Matlab does not even give e. My mis-understanding of the problem was
> pointed out by Doug Stewart. Doug posted new code yesterday, which I've
> tried unsuccessfully, but I cannot be sure that I've implemented residual.m
> correctly. The corrected code still produced e = [1 1 1 1] for me.
> Henry
>
>
> on 9/22/07 1:31 PM, Ben Abbott at address@hidden wrote:
>
>>
>> As a result of reading through Hodel's
>> http://www.nabble.com/bug-in-residue.m-tf4475396.html post I decided to
>> check to see how my Octave installation and my Matlab installation responded
>> to the example
>>
>> Using Matlab v7.3
>> --------------------------
>> num = [1 0 1];
>> den = [1 0 18 0 81];
>> [a,p,k] = residue(num,den)
>>
>> a =
>>
>> 0 - 0.0926i
>> 0.2222 - 0.0000i
>> 0 + 0.0926i
>> 0.2222 + 0.0000i
>>
>>
>> p =
>>
>> 0.0000 + 3.0000i
>> 0.0000 + 3.0000i
>> 0.0000 - 3.0000i
>> 0.0000 - 3.0000i
>>
>>
>> k =
>>
>> []
>> --------------------------
>>
>> Using Octave 2.9.13 (via Fink) on Mac OSX
>> --------------------------
>> num = [1 0 1];
>> den = [1 0 18 0 81];
>> [a,p,k] = residue(num,den)
>>
>> a =
>>
>> -3.0108e+06 - 1.9734e+06i
>> -3.0108e+06 + 1.9734e+06i
>> 3.0108e+06 + 1.9734e+06i
>> 3.0108e+06 - 1.9734e+06i
>>
>> p =
>>
>> -0.0000 + 3.0000i
>> -0.0000 - 3.0000i
>> 0.0000 + 3.0000i
>> 0.0000 - 3.0000i
>>
>> k = [](0x0)
>> e =
>>
>> 1
>> 1
>> 1
>> 1
>> --------------------------
>>
>> These are different from both the result that
>> http://www.nabble.com/bug-in-residue.m-tf4475396.html Hodel obtained , as
>> well as different from
>> http://www.nabble.com/bug-in-residue.m-tf4475396.html Mollet's
>>
>> Thoughts anyone?
>>
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave