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 #8783 is a reply to message #8773] Mon, 21 April 1997 00:00 Go to previous messageGo to previous message
brian.jackel is currently offline  brian.jackel
Messages: 23
Registered: May 1996
Junior Member
In article <5jg445$1mv@danberg.llnl.gov> dan@danberg.llnl.gov (Dan Bergmann) writes:

> Gary Fu <gfu@shark.gsfc.nasa.gov> writes:
> |> Is there a simple way to transpose the array(x,y,z) to array(y,x,z) ?

> Is there something better than

> for i=0,(size(array))(3)-1 do array(*,*,i) = transpose(array(*,*,i))
> array = reform(array,(size(array))(2),(size(array))(1),(size(array)) (3))


In the IDL 4.0 and later (and possibly earlier) documentation
------------------------------------------------------------ -------------------
Calling Sequence Result = TRANSPOSE(Array [, P])

Arguments

Array The array to be transposed.

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.
------------------------------------------------------------ -------------------

So result= TRANSPOSE( array, [1,0,2] ) should do it.
[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 17:46:30 PDT 2025

Total time taken to generate the page: 0.00430 seconds