This file fixes (to a certain degree) the numerical problems with repeated roots in 'residue.m'. Also, it will recognize repetitions of complex roots regardless of whether or not they can be sorted by '[p,i] = sort(-abs(v));'
I have tested it on polynomials up to 9th degree on Matlab 5.0.
incorrect results in calculating the residue of pole of multiplcity e.g. num=[2 1 3] and den=poly([2 2 2]) correct r=[2 9 13]; code needs to be improved :-)
31 Aug 2007
Tim S.
compare
>> [a,b,c]=residue(1,poly([1,1,1,-1,-1,-1]))
to
>> [a,b,c,d]=resid2wp(1,poly([1,1,1,-1,-1,-1]))
works in 2006a !
09 Oct 2005
Tom Hearn
Doesn't work. compare
>> [a,b,c]=residue(1,poly([1,1,1,-1,-1,-1]))
to
>> [a,b,c,d]=resid2wp(1,poly([1,1,1,-1,-1,-1]))