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

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

[Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN


From: Rik
Subject: [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility
Date: Wed, 12 Jul 2017 14:20:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Update of bug #51437 (project octave):

                  Status:                    None => Confirmed              
        Operating System:       Microsoft Windows => Any                    
                 Summary: mean(zeros(1,0)) does not return NaN =>
mean(zeros(1,0)) does not return NaN for Matlab compatibility

    _______________________________________________________

Follow-up Comment #2:

Confirmed.  I'm pretty sure Matlab changed this relatively recently and that
it used to return [].  It doesn't look that hard to fix, just a special test
for empty inputs.  You can see that Matlab has changed because the Octave
function supports a flag that allows you to specify arithmetic mean, geometric
mean, or harmonic mean.  That used to be part of Matlab.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51437>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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