octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57964] polyfit() results for polynomial degre


From: Michael Leitner
Subject: [Octave-bug-tracker] [bug #57964] polyfit() results for polynomial degree greater or equal than number of data
Date: Sat, 7 Mar 2020 09:20:41 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #2, bug #57964 (project octave):

I just looked into the matlab documentation, and it seems to be undocumented
(searching for "unique" on the polyfit page does not find anything). But yes,
it would not hurt if in polyfit.m a small additional check would be introduced
to test whether n is larger or equal to the number of data points, in which
case n would temporarily be decreased to the number of data points minus one
for the computation, and then the output be zero-padded to a length of n, and
a warning emitted. Such usages will always indicate either an error or a
situation in a user's program that was not foreseen.  However, if the other
output arguments are required, it would perhaps become messy, because of
course also all these matrices have to be expanded, and offhand I do not know
whether this is trivial.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57964>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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