[Top][All Lists]

[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

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?
Peter Anderson

This mail sent through IMP:

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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