[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: some multi-dimensional matrix problem

**From**: |
Bart Vandewoestyne |

**Subject**: |
Re: some multi-dimensional matrix problem |

**Date**: |
Mon, 24 May 2004 12:08:31 -0500 |

**User-agent**: |
Mutt/1.3.28i |

On Fri, May 21, 2004 at 05:22:03PM -0400, Etienne Grossmann wrote:
>* *
>* Hi Bart,*
>* *
>* something like:*
>* *
>* octave:5> p = randn (1,3,4), res = reshape (p,3,4)*
>* p =*
>* *
>* [...]*
>* *
>* res =*
>* *
>* -0.566865 -0.627797 -0.187179 0.523143*
>* 0.469599 0.105643 0.346800 -0.486609*
>* 1.764205 -0.212903 0.665555 0.042819*
>* *
>* Hth,*
>* *
>* Etienne*
Thanks for the hint, but I would like to have the transposed of what you
propose. I know I can transpose it after the reshape, but my guess was
that this takes some time, and since time is important in my
calculations, i was wondering if there isn't a faster way to get my
result. the 'squeeze' command also gives the same result as yours...
Isn't there a way to tell reshape to start filling row-wise instead of
column-wise? Or another way to get what i want?
Regards,
Bart
--
!!!!!!!!!!!!!!!!!!! email change !!!!!!!!!!!!!!!!!!!!
My email address is now address@hidden
Please update your addressbook!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-------------------------------------------------------------
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
-------------------------------------------------------------