[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A[X,Y,Z] -> A[Z,X,Y]
- Subject: A[X,Y,Z] -> A[Z,X,Y]
- From: greenwoodde(at)feda34.fed.ornl.gov (Dave Greenwood)
- Date: 9 AUG 2000 17:49:30 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Oak Ridge National Lab
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20741
I'm trying to analyze data from a new experiment using an IDL code from
a different experiment. The new experiment has data stored in an array
of the form [X,Y,Z] while the code expects [Z,Y,X]. I can do something
like (untested):
FOR i = 0, z-1 DO BEGIN
FOR j = 0, y-1 DO BEGIN
newarray[i, y, *] = oldarray[*, y, i]
ENDFOR
ENDFOR
But I thought perhaps someone (probably several people) here could
suggest a better (faster, more elegant, etc.) way?
Fyi, to give some size to the problem, X=1024, Y=39 and Z=3.
Thanks,
Dave
--------------
Dave Greenwood Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself