Patch to residue.m

Ben Abbott bpabbott at mac.com
Fri Jan 11 03:40:55 CST 2008


I believe this patch is ready to be committed.

In the event of pole multiplicity, the committed version of residue.m  
does not use a single pole to represent a group of multiplicity.  
Instead the expansion of residues is done with the poles returned by  
roots . The attached patch changes the pole value associated with a  
group of multiplicity to be that of the mean of then entire group.

For example, if the poles were given by

octave:1> p = [3 3 3 3 3];
octave:2> p = roots(poly(p))
p =

    3.0026 + 0.0000i
    3.0008 + 0.0024i
    3.0008 - 0.0024i
    2.9979 + 0.0015i
    2.9979 - 0.0015i

The current committed version expands to residues as

r(1)/(x-p(1)) + r(2)/(x-p(2)).^2 + r(3)/(x-p(3)).^3 + r(4)/(x-p(4)).^4  
+ r(5)/(x-p(5)).^5

With each element of p(:) being different. However, the expansion of  
residues  should use a single value for the poles of a multiplicity  
group.

octave:3> p = mean(p)*ones(size(p))
p =

    3.0000
    3.0000
    3.0000
    3.0000
    3.0000

This patch makes this change.

In addition the checks for poles of zero value, pure real values, and  
pure imaginary values is done *after* consideration of pole  
multiplicity.

The attached patch and ChangeLog are identical to that submitted on  
Dec 31.

Ben

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080111/851f389f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: residue.patch
Type: application/octet-stream
Size: 3678 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080111/851f389f/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog
Type: application/octet-stream
Size: 187 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080111/851f389f/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: residue.m
Type: application/octet-stream
Size: 10025 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080111/851f389f/attachment-0002.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080111/851f389f/attachment-0001.html 


More information about the Octave-maintainers mailing list