[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: size of 3d array
From: |
David Bateman |
Subject: |
Re: size of 3d array |
Date: |
Mon, 04 Dec 2006 17:08:46 +0100 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
John W. Eaton wrote:
> 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);
> x(2,4)
> ==> 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
> size.
>
> | 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.
>
> Thanks,
>
> jwe
>
>
Ok done...
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary