[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
-------------------------------------------------------------
- Matrix construction without loops,
pand9613 <=
- Re: Matrix construction without loops, Mike Miller, 2003/02/18
- unwind_protect, Doug Stewart, 2003/02/18
- Re: unwind_protect, Nick Allen, 2003/02/18
- Re: unwind_protect, Henry F. Mollet, 2003/02/18
- Re: unwind_protect, Dirk Eddelbuettel, 2003/02/18
- Re: unwind_protect, Dmitri A. Sergatskov, 2003/02/18
- Re: unwind_protect, Henry F. Mollet, 2003/02/19
- Re: unwind_protect, Dmitri A. Sergatskov, 2003/02/19
- Re: unwind_protect, Henry F. Mollet, 2003/02/19
- Re: unwind_protect, Per Persson, 2003/02/19