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 #7232 is a reply to message #7229] Tue, 15 October 1996 00:00 Go to previous messageGo to previous message
paul is currently offline  paul
Messages: 22
Registered: June 1991
Junior Member
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"
; there is a one-to-one correspondence of
; "vector" elements on the RHS with "array"
: elements on the LHS. Because "array" had
; already been defined as an (n,n,m) array,
; this equation does not alter the variable
; type.
--

____________________________________________________________ _______________
Paul Ricchiazzi
Institute for Computational Earth System Science (ICESS)
University of California, Santa Barbara

email: paul@icess.ucsb.edu
____________________________________________________________ _______________
[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 12:30:06 PDT 2025

Total time taken to generate the page: 0.32371 seconds