[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: residue() confusion
From: |
Henry F. Mollet |
Subject: |
Re: residue() confusion |
Date: |
Tue, 25 Sep 2007 16:11:22 -0700 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
residue4.m as patched by Doug Stewart yields the same results.
Henry
octave-2.9.14:55> num = [1 2 3 4]
num =
1 2 3 4
octave-2.9.14:60> den = conv(den,[1,2,1])
den =
1 2 19 36 99 162 81
octave-2.9.14:61> [r,p,m,e] = residue4(num,den)
r =
0.0280000 - 0.0000000i
0.0200000 + 0.0000000i
-0.0140000 - 0.0017037i
-0.0011111 - 0.0633333i
-0.0140000 + 0.0017037i
-0.0011111 + 0.0633333i
p =
-1.00000 - 0.00000i
-1.00000 - 0.00000i
0.00000 + 3.00000i
-0.00000 + 3.00000i
0.00000 - 3.00000i
-0.00000 - 3.00000i
m = [](0x0)
e =
1
2
1
2
1
2
on 9/25/07 3:27 PM, A. Scottedward Hodel at address@hidden wrote:
> I have a kludgy but I think functional fix to residue.m. It may
> still get confused if there's a big cluster of poles close by each
> other,.
>
> Here's a simple test code:
>
> num = [1 2 3 4]
> den = conv([1,3*j],1,-3*j])
> den = conv([1,3*j],[1,-3*j])
> den = conv(den,den)
> den = conv(den,[1,2,1])
> [r,p,m,e] = residue(num,den)
>
> with output:
>
> r =
>
> 0.0280000 + 0.0000000i
> 0.0200000 - 0.0000000i
> -0.0140000 + 0.0017037i
> -0.0011111 + 0.0633333i
> -0.0140000 - 0.0017037i
> -0.0011111 - 0.0633333i
>
> p =
>
> -1.00000 + 0.00000i
> -1.00000 + 0.00000i
> -0.00000 - 3.00000i
> -0.00000 - 3.00000i
> -0.00000 + 3.00000i
> -0.00000 + 3.00000i
>
> m = [](0x0)
> e =
>
> 1
> 2
> 1
> 2
> 1
> 2
>
- Re: residue() confusion, (continued)
- Re: residue() confusion, Ben Abbott, 2007/09/23
- Re: residue() confusion, Doug Stewart, 2007/09/23
- Re: residue() confusion, Ben Abbott, 2007/09/23
- Re: residue() confusion, Doug Stewart, 2007/09/24
- Re: residue() confusion, Ben Abbott, 2007/09/24
- Re: residue() confusion, Henry F. Mollet, 2007/09/24
Re: residue() confusion, A. Scottedward Hodel, 2007/09/25