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

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

[Octave-bug-tracker] [bug #65478] hist produces nonconformtant arguments


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #65478] hist produces nonconformtant arguments error when input has ndims > 2
Date: Mon, 18 Mar 2024 16:57:58 -0400 (EDT)

Follow-up Comment #1, bug #65478 (group octave):

octave's hist has different codepaths for small and large n.  for larger in it
doesn't error, but the output is incorrect:



>> [a,b] = hist ([1:5;2:6;3:7]', 15)
a =

   1   0   0
   0   0   0
   1   1   0
   0   0   0
   0   0   0
   1   1   1
   0   0   0
   1   1   1
   0   0   0
   0   0   0
   1   1   1
   0   0   0
   0   1   1
   0   0   0
   0   0   1

b =

   1.2000
   1.6000
   2.0000
   2.4000
   2.8000
   3.2000
   3.6000
   4.0000
   4.4000
   4.8000
   5.2000
   5.6000
   6.0000
   6.4000
   6.8000

>> [a,b] = hist (permute([1:5;2:6;3:7]',[1 3 2]), 15)
a =

   1
   0
   1
   0
   0
   1
   0
   1
   0
   0
   1
   0
   0
   0
   0

b =

   1.2000
   1.6000
   2.0000
   2.4000
   2.8000
   3.2000
   3.6000
   4.0000
   4.4000
   4.8000
   5.2000
   5.6000
   6.0000
   6.4000
   6.8000




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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