polyfit hangs on inf input

Dmitri A. Sergatskov dasergatskov at gmail.com
Mon Nov 3 12:11:47 CST 2008


The following code seems to hang octave 3.0.2 (on Fedora 9 x86_64):

xx=linspace(-1,1,11);
yy=2*linspace(-1,1,11);
xx(6)=Inf;
polyfit(xx',yy',1)

The problem seems to be with underlying x\y code.
I do not know WWMD in this case, but hanging does not
seem to be appropriate. Either bailing out with an error,
or ignoring with a warning seem to be better options.

Dmitri.


More information about the Help-octave mailing list