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

Home » Public Forums » archive » Re: Setting values in an array without usings loops
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: Setting values in an array without usings loops [message #35870 is a reply to message #35869] Fri, 25 July 2003 08:12 Go to previous messageGo to previous message
Johan Marais is currently offline  Johan Marais
Messages: 7
Registered: July 2003
Junior Member
Thanks, that works well!!


"Nancy W. Pearson" <pearson@elbereth.uchicago.edu> wrote in message
news:bfrfuj$ppd$1@bob.news.rcn.net...
> Johan Marais wrote:
>> 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
>
> IDL> m = shift(dist(2*r),r,r) gt r
>
> TTFN,
>
> David Grier
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to detect edge of an image in IDL?
Next Topic: Online manual

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

Current Time: Sat Oct 11 12:33:18 PDT 2025

Total time taken to generate the page: 1.04859 seconds