help-octave
[Top][All Lists]
Advanced

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

Re: Octave_map and vectors


From: Geraint Paul Bevan
Subject: Re: Octave_map and vectors
Date: Tue, 28 Oct 2003 14:42:54 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Claudio Belotti wrote:
| Hi all,
| how can I return a vector (an array?) of Octave_map from an oct function?
|


octave:1> function y = myfunc()
| y(1).name = "first name";
| y(1).type = "first type";
| y(2).name = "next name";
| y(2).type = "next type";
| endfunction
octave:2> data = myfunc
data =
{
~  name =
~  (
~    [1] = first name
~    [2] = next name
~  )
~  type =
~  (
~    [1] = first type
~    [2] = next type
~  )
}

octave:3> data(1)
ans =
{
~  name = first name
~  type = first type
}


- --
Geraint Bevan
http://www.mech.gla.ac.uk/~gbevan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iEYEARECAAYFAj+egG0ACgkQcXV3N50QmNMuqwCcCxgFLfUlLc3RQLK+sChhLUs9
v6QAnA0iterlH/pYJPEKTtZxgxorpJ/f
=+jx2
-----END PGP SIGNATURE-----



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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