help-octave
[Top][All Lists]
Advanced

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

Matrix construction without loops


From: pand9613
Subject: Matrix construction without loops
Date: Tue, 18 Feb 2003 15:33:31 +1100
User-agent: Internet Messaging Program (IMP) 3.0

Hi,
I am trying to construct a matrix with rows based on a vector without using any 
sort of loops.

given a vector [a,b,c,d], i want to create a matrix:
[a, b, c, d; 
 b, c, d, a;
 c, d, a, b;
 d, a, b, c]

so each the positions of each value in the row cycles one place to the left 
each row.
For small vectors i can use a loop without any hassles but i am plan to be 
using quite sizable vectors so i want to cut down on run time.
Any suggestions?
Cheers,
Peter Anderson




-------------------------------------------------
This mail sent through IMP: www-mail.usyd.edu.au



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