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

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

[Octave-bug-tracker] [bug #48749] size of java arrays


From: Ernst Reissner
Subject: [Octave-bug-tracker] [bug #48749] size of java arrays
Date: Wed, 10 Aug 2016 14:05:10 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

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

                 Summary: size of java arrays 
                 Project: GNU Octave
            Submitted by: ernstreissner
            Submitted on: Wed 10 Aug 2016 02:05:07 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

In

http://de.mathworks.com/help/matlab/ref/size.html

we read:

For a Java array, size returns the length of the Java array as the number of
rows. The number of columns is always 1. For a Java array of arrays, the
result describes only the top level array.

In fact, in octave,

octave:22> arr=javaArray('java.lang.Object',5)
arr =

<Java object: java.lang.Object[]>

octave:23> size(arr)
ans =

   5   1

Which is correct: 5 is the number of rows and 1 the number of columns.

But lets go on:

octave:24> arr=javaArray('java.lang.Object',5,4)
arr =

<Java object: java.lang.Object[][]>
octave:25> size(arr)
ans =

   5   4

which is not correct.

The result should still be 5 1.







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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