help-octave
[Top][All Lists]
Advanced

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

creation of (1,q,q^2,...,q^n) vector?


From: Christoph Dalitz
Subject: creation of (1,q,q^2,...,q^n) vector?
Date: Tue, 4 Nov 2003 11:46:49 +0100

Hello,

does someone know of an efficient way (i.e. without a loop) to create the
vector (1,q^2,...,q^n) in Octave?

I have found the builtin function "vander", so that

        v = vander (q*ones(1,n))(1,:);

does the trick, but wastes space and time on the unnecessary rows 2,..,n.

Any other idea?

Christoph



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