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

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

[Octave-bug-tracker] [bug #38815] ~ operator or dec2bin()


From: anonymous
Subject: [Octave-bug-tracker] [bug #38815] ~ operator or dec2bin()
Date: Tue, 23 Apr 2013 19:28:26 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0

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

                 Summary: ~ operator or dec2bin()
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 23 Apr 2013 07:28:24 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

In Matlab:

>> a = [0 1 2 3]

a =

     0     1     2     3

>> dec2bin(~a)

ans =

1
0
0
0

>> dec2bin(~a,1)

ans =

1
0
0
0

but in Octave:

octave:4> a=[0 1 2 3]
a =

   0   1   2   3

octave:5> ~a
ans =

   1   0   0   0

octave:6> dec2bin(~a,1)
error: dec2base: input must be real non-negative integers
error: called from:
error:   /usr/share/octave/3.6.4/m/strings/dec2base.m at line 71, column 5
error:   /usr/share/octave/3.6.4/m/strings/dec2bin.m at line 48, column 7
octave:6> dec2bin(real(~a),1)
ans =

1
0
0
0





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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