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

Home » Public Forums » archive » Setting values in an array without usings loops
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Setting values in an array without usings loops [message #35874] Fri, 25 July 2003 07:12
Johan Marais is currently offline  Johan Marais
Messages: 7
Registered: July 2003
Junior Member
I want to create a circle consisting out of ones but without the use of for
loops. here is how I do it with the loops. Anyone that can help?

r = 33
mask = intarr(2*r,2*r)
for m=0,2*r-1 do begin
for n=0,2*r-1 do begin
if ((m-r)^2 + (n-r)^2) gt r^2 then mask[m,n] = 1
endfor
endfor


--
Johan Marais
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Button Widget won't focus
Next Topic: Re: How to detect edge of an image in IDL?

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

Current Time: Wed Oct 08 17:23:51 PDT 2025

Total time taken to generate the page: 0.00527 seconds