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

Home » Public Forums » archive » Re: Help: how to do ?
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: Help: how to do ? [message #15277 is a reply to message #15269] Tue, 04 May 1999 00:00 Go to previous messageGo to previous message
Robert S. Hill is currently offline  Robert S. Hill
Messages: 11
Registered: January 1998
Junior Member
On Tue, 4 May 1999, Pavel Romashkin wrote:

> Hi Tri,
> Now I tested it better. Try the following:
>

I added the following method to Pavel's test program:

start=systime(1)
a1=findgen(1,3)
a2=findgen(n,3)
a3 = make_array(n,val=1) # a1
a4 = a2 + a3
print, systime(1) - start
print, a4

I can't remember where I ran across this trick of using a matrix multiply
operation to replicate rows or columns. In any case, it's about the same
speed as Pavel's method (using the reform function) for small values of N,
but on my system takes about 0.6 the time of Pavel's method for n=100000
or more. How it depends on the Y dimension, I haven't checked.

Bob Hill

--
Robert.S.Hill.1@gsfc.nasa.gov Phone: 301-286-3624
Raytheon ITSS / Code 681, NASA/GSFC, Greenbelt, MD 20771
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Experimental FAQ
Next Topic: New procedure to plot great circles on a map

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

Current Time: Sat Oct 11 01:08:52 PDT 2025

Total time taken to generate the page: 0.64031 seconds