Re: OCTAVE: Is Array3 available as a 3D array datatype in Octave

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: OCTAVE: Is Array3 available as a 3D array datatype in Octave

Bryce Gardner-2
Just a thought on multidimensional arrays:
One way to extend octave to handle fairly complex multidimensional data
structures would be to allow arrays of structures.

a(1).a=[1,2;3,4];
a(2).a=[5,6;7,8];

and then a(2).a(1,2) would access the 6 and a(:).a(1,1) would be [1;5] or [1,5].

This may not be as flexible as a true multidimensional array, but in a lot
of ways it may be more powerful.  I think the arrays of structures might be
easier to implement and the syntax is probably obvious.

On the other hand, the syntax that Ted suggested would be easier to implement
in an m-file and to test before hard-coding it into octave.

Thats my 2-cents worth,

Bryce
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: OCTAVE: Is Array3 available as a 3D array datatype in Octave

John W. Eaton-6
On  9-Jul-1997, Bryce Gardner <[hidden email]> wrote:

| Just a thought on multidimensional arrays:
| One way to extend octave to handle fairly complex multidimensional data
| structures would be to allow arrays of structures.
|
| a(1).a=[1,2;3,4];
| a(2).a=[5,6;7,8];
|
| and then a(2).a(1,2) would access the 6 and a(:).a(1,1) would be
| [1;5] or [1,5].

The next major release of Octave (not any 2.0.x release) will support
generic lists and more relaxed parsing of indexing operations, so this
sort of thing should be possible.

Thanks,

jwe


Reply | Threaded
Open this post in threaded view
|

Re: OCTAVE: Is Array3 available as a 3D array datatype in Octave

Guido Dietz-2
 On Thu, 10 Jul 1997 01:31:14 -0500 you, "John W. Eaton", wrote:

> On  9-Jul-1997, Bryce Gardner <[hidden email]> wrote:
>
> | Just a thought on multidimensional arrays:
> | One way to extend octave to handle fairly complex multidimensional data
> | structures would be to allow arrays of structures.
> |
> | a(1).a=[1,2;3,4];
> | a(2).a=[5,6;7,8];
> |
> | and then a(2).a(1,2) would access the 6 and a(:).a(1,1) would be
> | [1;5] or [1,5].
>
> The next major release of Octave (not any 2.0.x release) will support
> generic lists and more relaxed parsing of indexing operations, so this
> sort of thing should be possible.

I reckon some load and save features for structs would be worthfull before
...

G.

------------------------------------------------------------------AIA-RWTH--
            Guido Dietz                   Email:    [hidden email]
Aerodynamisches Institut der RWTH-Aachen  WWW: http://www.aia.rwth-aachen.de
      Wuellnerstr. zw. 5 u. 7             Ftp:  ftp://ftp.aia.rwth-aachen.de
      D-52062 Aachen, Germany   Phone: +49-241-80-5426 Fax: +49-241-8888-257
----------------------------------------------------------------------------
Never eat more than you can lift.
                -- Miss Piggy
----------------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

Re: OCTAVE: Is Array3 available as a 3D array datatype in Octave

John W. Eaton-6
In reply to this post by John W. Eaton-6
On 10-Jul-1997, Guido Dietz <[hidden email]> wrote:

|  On Thu, 10 Jul 1997 01:31:14 -0500 you, "John W. Eaton", wrote:
|
| > The next major release of Octave (not any 2.0.x release) will support
| > generic lists and more relaxed parsing of indexing operations, so this
| > sort of thing should be possible.
|
| I reckon some load and save features for structs would be worthfull before
| ...

Oh, there are lots of things on the TODO list.  It never seems to
shrink...

jwe