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

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

[Octave-bug-tracker] [bug #51144] image package: mean2([]) gives incompa


From: Hartmut
Subject: [Octave-bug-tracker] [bug #51144] image package: mean2([]) gives incompatible error
Date: Tue, 30 May 2017 14:05:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

URL:
  <http://savannah.gnu.org/bugs/?51144>

                 Summary: image package: mean2([]) gives incompatible error
                 Project: GNU Octave
            Submitted by: hardy
            Submitted on: Tue 30 May 2017 06:05:04 PM UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.2.1
        Operating System: Any

    _______________________________________________________

Details:

This happens with Octave 4.2.1 and image-2.6.1:

>> mean2([])
error: mean2: argument must be a 2D image
error: called from
    mean2 at line 31 column 5

>> mean([])
warning: division by zero
warning: called from
    mean at line 116 column 7
ans = NaN


The corresponding output of Matlab (R20124b) is:

>> mean2([])
ans =
   NaN

>> mean([])
ans =
   NaN


So the result of mean2 is NOT Matlab compatible for an empty matrix as input.
Octave mean2 throws an error, Matlab doesn't. 

And this incompatibility of mean2 cannot be blaimed onto te underlying (Octave
core function) mean, because its output for an empty matrix as input IS Matlab
compatible.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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