help-octave
[Top][All Lists]

## any get() and assign() functionality (as in Splus)

 From: Stefan Jonsson Subject: any get() and assign() functionality (as in Splus) Date: Wed, 24 Apr 2002 15:27:37 +0000

```

hello Octave community

```
I am trying to find a way to work around the fact that Octave does not support 3D arrays
```
I have 60 squared matrices   of order 10. A01, A02, ... ,A60

in a for loop I want to get the jth A matrix.

Lets say I have a vector of all the names of all the A  matrices such:

Anames = [ "A01"; "A02" ; .... ; "A60']

and to expand on this quetion lets say I have the  Xnames vector as well
Xnames = [ "x01"; "x02" ; .... ; "x60']

I have x0 defined as vector of size 10.

```
I want to create 60 x vectors that corresponds to the entries in Xnames. x01, x02, ..... ,x60
```

```
is there a way by any means to extract from the name vector the corresponding Aj matrix. And similarly put the result from a calculation in a x-vector that corresponds to the name found
```in Xnames(j)

Example:

for j = 1:N  # where N can take a value from 1 to 60

Aj = get.matrixfrom.a.name.vector(Anames(j))

xj = Aj*x0

Assign xj to a vector who's name is = Xnames(j)

endfor

The idea is similar to the use of get() and assign() in Splus.

Thanks
Stefan

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```