[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: some multi-dimensional matrix problem
From: |
David Bateman |
Subject: |
Re: some multi-dimensional matrix problem |
Date: |
Tue, 25 May 2004 16:03:37 +0200 |
User-agent: |
Mutt/1.4.1i |
According to Bart Vandewoestyne <address@hidden> (on 05/24/04):
>
> 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
All the functions squeeze and reshape do is change the dim_vector for
the octave_value, without touching the underlying data which is stored
essentially as a vector. So there is no transpose involved, and it is
thus a low cost operation. If what you want is the transpose of this
then you have no choice you must touch the underlying data, thus
"transpose(squeeze(x))" is probably optimal.
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
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
-------------------------------------------------------------