[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: |
Mon, 24 Jul 2017 19:28:06 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #8, bug #51437 (project octave):
Other languages which are far stronger in statistics, such as R, return NaN
for the case of empty matrices. Sample R code,
x = matrix (c(1), nrow=3, ncol=0)
mean(x)
It seems more useful mathematically for Octave to return NaN in these cases
rather than occasionally NaN and occasionally a dimensioned empty matrix, even
if there is a rule for when "occasionally" occurs.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51437>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN, anonymous, 2017/07/11
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN, Reimund Renner, 2017/07/11
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Rik, 2017/07/12
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Reimund Renner, 2017/07/13
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Reimund Renner, 2017/07/13
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Rik, 2017/07/14
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Reimund Renner, 2017/07/17
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Luis Mendo, 2017/07/24
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility,
Rik <=
- [Octave-bug-tracker] [bug #51437] mean(zeros(1, 0)) does not return NaN for Matlab compatibility, Reimund Renner, 2017/07/25