[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: |
Thu, 30 Oct 2003 17:55:02 +0100 |
User-agent: |
Mutt/1.3.28i |
Geraint & John
I've managed to do what I want (returning a list of maps), so now the
output is:
ans =
(
[1] =
{
name = Hello
number = 1
}
[2] =
{
name = world
number = 2
}
)
// -*-c++-*-
// test.cc
#include <octave/oct.h>
#include <octave/oct-map.h>
DEFUN_DLD (test, args, , "test")
{
Octave_map map1,map2;
map1["name"]=(octave_value)"Hello";
map2["name"]=(octave_value)"world";
map1["number"]=(octave_value)1;
map2["number"]=(octave_value)2;
octave_value_list retlist;
retlist(0) = map1;
retlist(1) = map2;
return octave_value(retlist);
}
-------------------------------------------------------------
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
-------------------------------------------------------------