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: Fri, 14 Jul 2017 17:02:22 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #5, bug #51437 (project octave):

Why, as a mathematical proposition, shouldn't mean() return NaN for all empty
matrices?

I can't find any easy pattern to the results that you have from Matlab.  It
seems to me that this may be an instance where Octave does not want to follow
Matlab exactly since there seems to be quirks of implementation here, rather
than reasonable mathematical results.

If you could, try these further tests in Matlab:


mean (zeros (0,0))
mean (zeros (1,0))
mean (zeros (2,0))




    _______________________________________________________

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]