[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: creation of (1,q,q^2,...,q^n) vector?
From: |
Laurent Jacques |
Subject: |
Re: creation of (1,q,q^2,...,q^n) vector? |
Date: |
Tue, 4 Nov 2003 12:01:27 +0100 |
User-agent: |
KMail/1.5.4 |
Hi,
Does this answer to your question ?
I'm not sure it is that you want.
q = 3;
v = q.^(0:n);
Laurent.
On Tuesday 04 November 2003 11:46, Christoph Dalitz wrote:
> 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
> -------------------------------------------------------------
-------------------------------------------------------------
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
-------------------------------------------------------------
- creation of (1,q,q^2,...,q^n) vector?, Christoph Dalitz, 2003/11/04
- Re: creation of (1,q,q^2,...,q^n) vector?,
Laurent Jacques <=
- Re: creation of (1,q,q^2,...,q^n) vector?, Lute Kamstra, 2003/11/04
- Prev by Date:
creation of (1,q,q^2,...,q^n) vector?
- Next by Date:
Re: creation of (1,q,q^2,...,q^n) vector?
- Previous by thread:
creation of (1,q,q^2,...,q^n) vector?
- Next by thread:
Re: creation of (1,q,q^2,...,q^n) vector?
- Index(es):