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 #35872 is a reply to message #35871] Fri, 25 July 2003 07:47 Go to previous message
Nancy W. Pearson is currently offline  Nancy W. Pearson
Messages: 1
Registered: July 2003
Junior Member
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: Sun Oct 12 17:24:43 PDT 2025

Total time taken to generate the page: 0.32548 seconds