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

Home » Public Forums » archive » vectorization challenge! (help!)
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: vectorization challenge! (help!) [message #54893 is a reply to message #54844] Thu, 19 July 2007 09:40 Go to previous messageGo to previous message
alvin[1] is currently offline  alvin[1]
Messages: 4
Registered: July 2007
Junior Member
Hi there:

If I understand your problem truly, I would have done this:
The code is not efficient, and contains redundant values in the 'for'
loop.
With a little playing around, you can reduce the size of randindex in
the
loop. Hope this helps.

Alvin Das

n=24 ; How large is this value?
npeeps=50 ;How large is this?
gn1 = findgen(n,npeeps)
gn2=qn1

;;;;;cutoff = .01 ;;;; What does this do?

randindex = long(randomu(seed,npeeps)*n) ;;;;; I don't know
what 'nd'
is!

;;;if randomu(seed,1) lt cutoff then begin ?? ;;;;This is throwing
me
off...
;;;;What do you
intend to do
here?

thisval=n*indgen(npeeps)+n-1
for i=1,n do randindex=[randindex,(randindex+n-1)<thisval]
temp = gn1[randindex]
gn1[randindex] = gn2[randindex]
gn2[randindex] = temp
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: warp_tri()
Next Topic: Re: how can idl find out information of other softwares

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

Current Time: Sat Oct 11 06:56:47 PDT 2025

Total time taken to generate the page: 0.95933 seconds