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

Home » Public Forums » archive » Re: How does REFORM work in PV-Wave
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: How does REFORM work in PV-Wave [message #18077] Wed, 01 December 1999 00:00 Go to previous message
jeyadev is currently offline  jeyadev
Messages: 78
Registered: February 1995
Member
In article <mgs-52612D.20571630111999@news.silcom.com>,
Mike Schienle <mgs@ivsoftware.com> wrote:
>
> You can probably find more than you wanted to know abot row and column
> order by visiting the IDL FAQ at <http://www.ivsoftware.com:8000/FAQ/>.
> Select the "Search FAQ" button. Enter the word "major" in the "Question"
> field and press the "Start Search" button. You'll be treated to a fairly
> detailed discussion on column- and row-major, as well as memory access
> into the arrays.

Found it, at last, by listing all the questions, but I know all *that*
stuff.

My question was what happens beyond 2 dimensions and how REFORM treats
a 2d to 3d coversion. I will simplify my question in the hope that some
kind soul will help me out.

Let us say that I have the data file

1 13
2 14
3 15
4 16
5 17
6 18
7 19
8 20
9 21
10 22
11 23
12 24

and that the first column represents data for a variable that is defined
on a 3 x 4 (i.e. 3 column and 4 rows) grid and the second column is for
another variable on the same grid. Assume that the data is stored in the
the array odat(2,12).

What is I want to do is the following: I want to create a 3 data array
with two planes of 3 x 4 elements so that each plane contains the the data
for one variable.

The REAL QUESTION: The command

data = reform(odat,2,3,4)

seems to do the job. For example

WAVE> a = data(0,*,*)
WAVE> info, a
A INT = Array(1, 3, 4)
WAVE> a = reform(a)
WAVE> info, a
A INT = Array(3, 4)
WAVE> print, a
1 2 3
4 5 6
7 8 9
10 11 12

which is exactly what I want. Now, what I would like to know is why the
number of planes (2) had to be the *first* index in the reform statement.

thanks
--

Surendar Jeyadev jeyadev@wrc.xerox.com
[Message index]
 
Read Message
Read Message
Previous Topic: 3D hardware acceleration and Linux
Next Topic: Re: do I really need to use loops on objects?

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

Current Time: Fri Oct 10 10:54:54 PDT 2025

Total time taken to generate the page: 0.96251 seconds