help-octave
[Top][All Lists]
Advanced

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

Re: Octave_map and vectors


From: Claudio Belotti
Subject: Re: Octave_map and vectors
Date: Tue, 28 Oct 2003 16:00:52 +0100
User-agent: Mutt/1.3.28i


thanks Geraint,
with oct function I was meaning a c++ dynamical extension of the Octave 
interpreter, not a an octave script.

Claudio


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



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