[Top][All Lists]

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

Re: size of 3d array

From: John W. Eaton
Subject: Re: size of 3d array
Date: Mon, 4 Dec 2006 10:45:50 -0500

On  4-Dec-2006, David Bateman wrote:

| Norbert Hauser wrote:
| > 
| > Is there an explanation, why matlab combines the dimensions 2+3 in
| > s2, but octave doesn't? Has this been implemented intentionally,
| > and can I make octave behave like matlab in this case without
| > changing existing code?

I think Matlab does this to be consistent (?) with the way it also
allows indexing like this:

  x = reshape (1:8, 2, 2, 2);
    ==> 8

I remember recently changing Octave to allows this indexing to work,
but I didn't know that the size function would also report a different

| The attached patch will make octave compatible with the behavior of
| matlab. I don't know if I like the behavior of matlab, but if we want
| compatibility this patch will do it.

Please check in the change to Octave.



reply via email to

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