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

Home » Public Forums » archive » Re: REPLICATE 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: REPLICATE question [message #7229 is a reply to message #7218] Wed, 16 October 1996 00:00 Go to previous messageGo to previous message
dan is currently offline  dan
Messages: 27
Registered: March 1993
Junior Member
In article <PAUL.96Oct15094317@skua.s2k.ucsb.edu>, paul@skua.s2k.ucsb.edu (Paul Ricchiazzi) writes:
|>
|> In article <32636705.41C6@jmc-luni.u-bordeaux2.fr> Mario Noyon <mnoyon@jmc-luni.u-bordeaux2.fr> writes:
|>
|> I would like to divide an arr1(n,n,m) by an arr2(n,n) and be able to
|> obtain an array(n,n,m). I suppose there is a way to avoid the for
|> statements.
|> I had the idea to transform my arr2(n,n) in an arr2(n,n,m) where the
|> m-elements are all the same but REPLICATE does not work with the arrays.
|>
|> Does some-one have an idea that could help me?
|>
|>
|>
|> how about,
|>
|> array=aar1 ; define "array" as an (n,n,m) array
|> ii=lindgen(n*n*m) ; define "ii" as a one dimension index array
|> array=arr1(ii)/aar2(ii/m) ; "ii/m" is the correct index array for "aar2"

I don't think that will actually work, but something similar might

ii = lindgen(n*n*m)
array = arr1(ii) / arr2(ii mod (n*n))
--
************************************************************ ***
** Dan Bergmann dbergmann@llnl.gov **
** Atmospheric Science Division fax (510) 422-5844 **
** Lawrence Livermore National Lab human (510) 423-6765 **
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: VIEWPORT_EVENTS
Next Topic: Re: Looking for: IDL-widget routine for spectrosc. Data (Raman/IR)

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

Current Time: Sat Oct 11 02:23:49 PDT 2025

Total time taken to generate the page: 1.19555 seconds