From help-request at octave dot org Thu Jul 8 05:32:52 2004 Subject: Re: Octave C++ classes From: David Bateman To: Tommaso Cucinotta Cc: help at octave dot org Date: Thu, 8 Jul 2004 12:26:17 +0200 Check out the code in do_index_op and assign in ov-base-mat.cc where the class index_vector is used. The value of index_vector can be a ":" (flagged as a magic colon) or a range. This should do pretty much what you want. As for the octave -> c++ compiler check out http://www.stud.tu-ilmenau.de/~rueckn/ which is experimental.. D. According to Tommaso Cucinotta (on 07/08/04): > Hi, > > I'd like to know if there is a "natural" way to > translate something like > > X_rev = X(length(X):-1:1) > > (or making other more advanced row or column selections, > like 1:2:9 ecc...) into C++ using the octave classes. > > It seems to me the Range class is what I need to use, but > I cannot figure out how to index a vector or matrix with a > Range. > > Also, I would like to know if anybody ever wrote an Octave to C++ > translator. > > Many thanks in advance, > > Tommaso. > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary ------------------------------------------------------------- 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 -------------------------------------------------------------