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: Reimund Renner
Subject: [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility
Date: Mon, 17 Jul 2017 04:09:34 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

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

It's a strange behavior:

mean (zeros (0,0)) = NaN
mean (zeros (1,0)) = NaN
mean (zeros (2,0)) = 1x0

Documentation of mean() only says about NaN:
If A is an empty 0-by-0 matrix, then mean(A) returns NaN

The same for std().

    _______________________________________________________

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]