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

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

[Octave-bug-tracker] [bug #49192] dec2bin function does not behave the s


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #49192] dec2bin function does not behave the same as Matlab
Date: Tue, 27 Sep 2016 11:04:02 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36

Update of bug #49192 (project octave):

                Priority:              5 - Normal => 3 - Low                
              Item Group:    Matlab Compatibility => WTF, Matlab?!?         
                  Status:                    None => Wont Fix               
                 Release:                   4.0.2 => 4.2.0-rc2              
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #1:

I would throw this bug report back to The Mathworks, e.g. in Matlab R2016a I
get:


>> dec2bin (0, 0)

ans =

   Empty matrix: 1-by-0


>> dec2hex (0, 0)
Error using reshape
To RESHAPE the number of elements must not change.

Error in dec2hex (line 59)
h = reshape(h,n0,numD)';
 
>> dec2base (0, 2, 0)

ans =

0

>> dec2base (0, 16, 0)

ans =

0


Here Octave looks more consistend, as it uses only dec2base in any case:


>> dec2bin (0, 0)
ans = 0
>> dec2hex (0, 0)
ans = 0
>> dec2base (0, 2, 0)
ans = 0
>> dec2base (0, 16, 0)
ans = 0


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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