comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: array transpose
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: array transpose [message #8788 is a reply to message #8783] Mon, 21 April 1997 00:00 Go to previous messageGo to previous message
William Clodius is currently offline  William Clodius
Messages: 30
Registered: December 1996
Member
David Fanning wrote:
>
> Christian Soeller <csoelle@sghms.ac.uk> writes:
>
>> Gary Fu <gfu@shark.gsfc.nasa.gov> writes:
>>
>>>>
>>>> RTFM -> transpose function
>>>>
>>>> Christian
>>>
>>> The TRANSPOSE function will transpose to array(Z,Y,X), not array(Y,X,Z).
>>
>> And what about transpose(array,[1,0,2]) ?
>> As I said, it's in the manual; one obviously has to know how to read it ;).
>
> What manual are you reading, Christian? Or perhaps more to the point,
> exactly HOW are you reading it!? I don't find this is *my* manual. :-(
>
> In any case, I can't get this to work. Can you perhaps tell us what
> software you are using and give us a simple example.
> <snip>

David:

Assuming you are using IDL and not PV-Wave (PV-Wave might differ on this
point) the Reference Guide or the online documentation accessed by
entering
> ?

both give for the TRANSPOSE function

"The TRANSPOSE function returns the transpose of Array. If an optional
permutation vector is provided, the dimensions of Array are rearranged
as well.

Calling Sequence
Result = TRANSPOSE(Array [, P])

Arguments
...
P
A vector specifying how the dimensions of Array will be permuted.
The elements of P correspond to the dimensions of Array; the ith
dimension of the output array is dimension P(i) of the input array. Each
element of the vector P must be unique. Dimensions start at zero and can
not be repeated.
If P is not present, the order of the indices of Array is
reversed. ...

To see how a multi-dimensional transposition works, first create a
three-dimensional array A:

A = INDGEN(2, 3, 4)

Take the transpose, reversing the order of the indices

B = TRANSPOSE(A)

Now re-order the dimensions of A, so that the second dimension becomes
the first, the third becomes the second and the first becomes the third

C = TRANSPOSE(A, [1, 2, 0])"


--

William B. Clodius Phone: (505)-665-9370
Los Alamos Nat. Lab., NIS-2 FAX: (505)-667-3815
PO Box 1663, MS-C323 Group office: (505)-667-5776
Los Alamos, NM 87545 Email: wclodius@lanl.gov
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Object Oriented Programming Book Recommendation
Next Topic: Interactive image viewer in IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:21:31 PDT 2025

Total time taken to generate the page: 0.00184 seconds