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 #7222 is a reply to message #7218] Thu, 17 October 1996 00:00 Go to previous messageGo to previous message
sjt is currently offline  sjt
Messages: 72
Registered: November 1993
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?

Various complicated methods have been suggested! All of which ignore the
fact that IDL allows the addition of trailing zero subscripts.

try:
sa1 = size(arr1) ; Don't even need this if you've got the size of arr2 somewhere

array = arr1/arr2(*,*,intarr(sa1(3))

and you're home free.

+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
[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: Wed Oct 22 08:48:37 PDT 2025

Total time taken to generate the page: 3.12175 seconds