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

Home » Public Forums » archive » array transpose
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
array transpose [message #8799] Sat, 19 April 1997 00:00 Go to next message
Gary Fu is currently offline  Gary Fu
Messages: 9
Registered: April 1997
Junior Member
Hi,

Is there a simple way to transpose the array(x,y,z) to array(y,x,z) ?

Thanks.

Gary
Re: array transpose [message #8842 is a reply to message #8799] Thu, 24 April 1997 00:00 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Gary Fu <gfu@shark.gsfc.nasa.gov> writes:

> Hi,

> Is there a simple way to transpose the array(x,y,z) to array(y,x,z) ?

> Thanks.

> Gary

Several people have recommended the built-in TRANSPOSE function. Apparently,
this was enhanced in IDL 4.0 to allow arrays with more than 2 dimensions, and
to include an optional parameter to list the order that the dimensions should
be rearranged into.

For older versions of IDL, I've written a routine called REARRANGE which does
the same thing. It has two modes of operation:

1. Pure IDL code.

2. Call to C code via CALL_EXTERNAL, if the proper logical name is
defined.

It differs from the new TRANSPOSE in only two ways:

1. It numbers the dimensions from 1 instead of 0. (Come-on, RSI,
other IDL built-in routines, like TOTAL, number dimensions starting
from 1 on.)

2. It allows one to signal that a given dimension should be reversed,
by passing it as a negative number.

I suppose it's somewhat obsolete now, but if anyone wants it, it can be found
at URL

ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/util/rearran ge.pro

and the CALL_EXTERNAL code can be found at URL

ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl_external

Bill Thompson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MESSAGE facility
Next Topic: PC Guru Needed

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

Current Time: Sat Oct 11 10:13:44 PDT 2025

Total time taken to generate the page: 0.88632 seconds