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

Home » Public Forums » archive » Strange array division problem
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
Strange array division problem [message #66296] Mon, 04 May 2009 14:42
David Klassen is currently offline  David Klassen
Messages: 27
Registered: December 2004
Junior Member
I'm trying to create an array by reading in 2-d data and putting into
planes in a 3-d array, however, some of the data is redundant---the 2-
d data would go into the same plane. In these cases, I want to
average them so I figure I can just add the data to the current plane
value, keeping track of how many data arrays go into each plane, then
just divide the final 3-d array by these counts. But I'm stuck on how
exactly to implement that.

My 3-d array X columns, Y rows, Z planes and the 2-d array is Z
columns by Y rows (so I'm "rotating" the data and "sliding" each one
into a column of the 3-d array---I hope that makes sense). I then
have a vector, xcounts, that is X elements long and as data go into
the columns, I increment xcounts[X].

So, when I'm done populating the 3-d array I need to divide each row
in each plane by the vector xcounts. Is there an easy way to do this
that doesn't involve me looping through all the points?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: simple IDLgrView question
Next Topic: Re: IDL Workspace error won't go away

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

Current Time: Tue Oct 28 15:47:45 PDT 2025

Total time taken to generate the page: 2.95911 seconds