[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: row vectors changed to column vectors?

**From**: |
Christian T. Steigies |

**Subject**: |
Re: row vectors changed to column vectors? |

**Date**: |
Wed, 11 Feb 2004 08:28:35 +0100 |

**User-agent**: |
Mutt/1.5.5.1+cvs20040105i |

On Tue, Feb 10, 2004 at 02:16:02PM -0500, Przemek Klosowski wrote:
>* But what takes much more time is creating a N:N matrix out of these *
>* vectors.*
>* I have to "glue" the matrix using a() as a column, where for each column *
>* a()*
>* has to be "rotated" by one position. I tried first with two for loops. Now *
>* I*
>* *
>* Would this be what you need:*
>* *
>* a=1:5 ; toeplitz(a,shift(fliplr(a),1)) *
>* ans =*
>* *
>* 1 5 4 3 2*
>* 2 1 5 4 3*
>* 3 2 1 5 4*
>* 4 3 2 1 5*
>* 5 4 3 2 1*
Thats exactly it, thanks a lot! 0.6s instead of 60s.
Christian
-------------------------------------------------------------
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
-------------------------------------------------------------

**row vectors changed to column vectors?**, *Christian T. Steigies*, `2004/02/10`
**row vectors changed to column vectors?**, *John W. Eaton*, `2004/02/10`
**Re: row vectors changed to column vectors?**, *Jonathan Stickel*, `2004/02/10`
**Re: row vectors changed to column vectors?**, *Christian T. Steigies*, `2004/02/10`
**Re: row vectors changed to column vectors?**, *Mike Miller*, `2004/02/10`
**Re: row vectors changed to column vectors?**, *Christian T. Steigies*, `2004/02/11`
**Re: row vectors changed to column vectors?**, *Christoph Dalitz*, `2004/02/10`
**Re: row vectors changed to column vectors?**, *Przemek Klosowski*, `2004/02/10`
**Re: row vectors changed to column vectors?**,
*Christian T. Steigies* **<=**
**Re: row vectors changed to column vectors?**, *Henry F. Mollet*, `2004/02/11`
**Re: row vectors changed to column vectors?**, *Paul Kienzle*, `2004/02/10`
**Re: row vectors changed to column vectors?**, *Andy Adler*, `2004/02/11`
**Re: row vectors changed to column vectors?**, *Paul Kienzle*, `2004/02/11`