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

Home » Public Forums » archive » Vectorizing Code
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Vectorizing Code [message #29539] Wed, 27 February 2002 14:44 Go to previous message
Steve Jones is currently offline  Steve Jones
Messages: 1
Registered: February 2002
Junior Member
Is it possible to vectorize a simple double for-loop?

for i=0,nstate-1 do begin
for j=0,nvec-1 do begin
sa(i,j)=10.^2*exp(-abs(i-j)*dz/h)
endfor
endfor

I tend to write a large number of such loops and my indexes have been
steadily increasing of late... Is there a faster alternative? Thanks
in advance
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL to MATLAB binary files
Next Topic: Best way to move a window

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

Current Time: Wed Oct 08 17:37:15 PDT 2025

Total time taken to generate the page: 0.00443 seconds