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

Home » Public Forums » archive » Re: dimensional headache
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: dimensional headache [message #43299] Wed, 06 April 2005 00:46 Go to previous message
Andrew[2] is currently offline  Andrew[2]
Messages: 7
Registered: February 2005
Junior Member
Hi again,

please ignore both of the previous posts by me. They dont work, DIST
was completly wrong. Dont know what I was thinking. Sorry. But you can
reduce what you do in the loops. For example the code below (and I made
sure this worked properly) runs in 16 milliseconds (pretty quick). Then
you can still do the rest of the code that I had before, or
alternatively your own code from your WhereToMulti statement.

t1=systime(/seconds)
d=findgen(160,160)
xgrid=findgen(160)
ygrid=findgen(160)

;i just assumed a central position here
xmod=79
ymod=79

dx=(xmod-xgrid)^2
dy=(ymod-ygrid)^2

for i=0,159 do for j=0,159 do d[i,j]=SQRT(dx[i]+dy[j])
t2=systime(/seconds)
print,t2-t1

Sorry about the dud answers before. I hope this one helps a bit even if
it didnt get rid of the loops.

Cheers
Andrew
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: texture map on cylindrical section
Next Topic: Re: calculating long term statistics on ALBEDO data

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

Current Time: Wed Oct 08 19:17:53 PDT 2025

Total time taken to generate the page: 0.00641 seconds