help-octave
[Top][All Lists]
Advanced

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

C++ insert row vector into matrix?


From: Michael Creel
Subject: C++ insert row vector into matrix?
Date: Thu, 28 Jun 2007 13:08:10 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

The Octave wiki CPP quick reference (http://wiki.octave.org/wiki.pl?CPPQuickReference) shows how to stack matrices. How can I insert a row vector into an existing matrix of zeros, to avoid constantly re-sizing? Or is re-sizing a low cost operation?

I'm trying this:
                W.insert(zzz, i, 0);
where W is a matrix and zzz is a row vector. This compiles, but is not correct.
Thanks, M.


reply via email to

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