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

Home » Public Forums » archive » Re: Accelerating a one-line program doing matrix multiplication
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: Accelerating a one-line program doing matrix multiplication [message #72758 is a reply to message #72662] Wed, 29 September 2010 07:49 Go to previous message
rogass is currently offline  rogass
Messages: 200
Registered: April 2008
Senior Member
On 29 Sep., 12:48, Axel M <axe...@gmail.com> wrote:
> I have to admit that I did not understand this proposed use of
> REPLICATE:
>
>>> sometimes (replicate({temp:input},newsize)).(0) is faster then rebin
>
> But it brought me a related question in mind: does IDL have a
> "REPLICATE" function for vectors instead of scalar values? I am using
> REBIN, but REBIN is thought for more advanced uses and probably
> suboptimal for a "replicate-like" use... right?

Yes, it has as I mentioned uncommented above:

sometimes (replicate({temp:input},newsize)).(0) is faster then rebin

-> this means:

IDL> a=findgen(3)
IDL> print,a
0.000000 1.00000 2.00000
IDL> print, rebin(a,3,5)
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
IDL> print, (replicate({temp:a},5)).(0)
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000
0.000000 1.00000 2.00000

Regards

CR
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote Facts
Next Topic: ENVI and IDL ROIs: Do they play nice?

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

Current Time: Sat Oct 11 14:31:37 PDT 2025

Total time taken to generate the page: 0.32139 seconds