help-octave
[Top][All Lists]
Advanced

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

Re: Appending to a ColumnVector


From: Michael Creel
Subject: Re: Appending to a ColumnVector
Date: Wed, 25 May 2005 13:55:27 +0200
User-agent: KMail/1.8

On Wednesday 25 May 2005 09:56, Søren Hauberg wrote:
> I looked at some of my old code last night, and I saw that I can do the
> following to append x to ColumnVector C:
>
>         C.resize_and_fill(index.length()+1, 1,  x);
>
> Personaly I find that code a bit hard to read, but it gets the work done.
>
> /Søren
>
> Søren Hauberg wrote:
> > Hi
> > In C++, what is the prefered way to append a value to a ColumnVector?
> >
> > /Søren
> >

From 
http://pareto.uab.es/mcreel/OctaveClassReference/html/classColumnVector.html 
there is the entry
ColumnVector ColumnVector::stack   (   const ColumnVector &   a    )    const
which looks like it might help. I don't see any resize_and_fill operation 
anywhere - does this work with more or less current versions of Octave?
M.



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