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

Home » Public Forums » archive » Re: Easy question?
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: Easy question? [message #16321 is a reply to message #16318] Wed, 14 July 1999 00:00 Go to previous messageGo to previous message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <7mhjl5$bme$1@readme.uio.no>, colin.rosenthal@astro.uio.no wrote:

> If I have an i*j*k array and vector of length k and I want to
> put the vector in every column of the array how do I do it?

FOR k = 0L, nk-1L DO a[*,*,k] = v[k]

> More specifically, I have a 3-d array and wish to compute the average
> value of the array over two of the dimensions and store the result in
> a 3-d array of the same size as the original.

Do you mean "store the result in a *2-D* array"? If so, then

a_mean = TOTAL(a, 3)/nk


If you really mean 3-D, then

a_mean = TOTAL(a, 3)/nk
FOR k = 0L, nk-1L DO a[0L,0L,k] = a_mean


Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL_MakeStruct()
Next Topic: Julian Date Question

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

Current Time: Thu Oct 09 20:32:34 PDT 2025

Total time taken to generate the page: 4.24113 seconds