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

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

[Octave-bug-tracker] [bug #56465] [nn, xx] = hist (double, single (N)) r


From: Rik
Subject: [Octave-bug-tracker] [bug #56465] [nn, xx] = hist (double, single (N)) returns xx of class single instead of double
Date: Sat, 8 Jun 2019 20:38:55 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

URL:
  <https://savannah.gnu.org/bugs/?56465>

                 Summary: [nn, xx] = hist (double, single (N)) returns xx of
class single instead of double
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Sat 08 Jun 2019 05:38:54 PM PDT
                Category: Octave Function
                Severity: 2 - Minor
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: Confirmed
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

For Matlab compatibility, when the second input to hist (# of bins) is a
scalar, then the class of xx follows the class of the input y (single or
double).  For example,


[nn, xx] = hist (double (1:10), single ([7]));
class (xx) => 'double'
[nn, xx] = hist (single (1:10), double ([7]));
class (xx) => 'single'


However, when the second input is an actual vector specifying bins then the
class of xx is always the class of the second input.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56465>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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