help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with consistency of root finding and sorting


From: Ben Abbott
Subject: problem with consistency of root finding and sorting
Date: Tue, 9 Oct 2007 19:57:00 -0400

I have Octave 2.9.14 on Mac OS X (intel & PPC) installed via Fink and am concerned that my installations are giving different results than others.

During the process of modifying residue.m so that it would function in a manner consistent with Matlab's I've become suspicious that my Octave installation does not work the same as others.

The difference is small, but is troublesome.

Given the following short example,

        r = sort(roots([1 0 18 0 81]))
        r_err = r - round(r)

I obtain the results below

r = sort(roots([1 0 18 0 81]))
r =

   0.0000 - 3.0000i
   0.0000 + 3.0000i
  -0.0000 - 3.0000i
  -0.0000 + 3.0000i

r_err = r - round(r)
r_err =

  2.5814e-08 + 1.6920e-08i
  2.5814e-08 - 1.6920e-08i
  -2.5814e-08 - 1.6920e-08i
  -2.5814e-08 + 1.6920e-08i

I suspect that others are getting slightly different results. Specifically, some installations appear to be returning conjugate of "r" instead. I've posted the "r_err" because it appears larger than I'd expect.

I'd appreciate if others would try to short script and post the result ... in the hope of isolating the problem.

TiA


reply via email to

[Prev in Thread] Current Thread [Next in Thread]