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

Home » Public Forums » archive » help - speeding up a loop
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
help - speeding up a loop [message #92551] Mon, 11 January 2016 09:29 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi guys,

I am trying to implement a circular smooth on an irregular x, y grid.
The following loop takes too much time. How do you think I could make it faster?

for i=0L, n_rang-1 do for j=0L, n_azim-1 do begin

distkm=sqrt((xx-xx[i,j])^2. + (yy-yy[i,j])^2.)

ww=where(distkm lt 5.,nn_w)
if nn_w gt 0 then data_res[i,j]=total(data[ww]) / nn_w

endfor

Thank you for your help,
nata
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: regarding IDL implementation of Gabor Filter based Image Feature Extraction and Image Classification
Next Topic: help - cgimage revise x and y positions

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

Current Time: Wed Oct 08 11:49:56 PDT 2025

Total time taken to generate the page: 0.00241 seconds