ofcourse. :) ...... I am trying to adjust to the proper Julia speak.
On Friday, 6 June 2014 20:34:22 UTC-4, Miguel Bazdresch wrote: > > I'm not sure I understand the question. Do you mean something like this? > > inside_disc(x,y,radius) = sqrt(x^2+y^2)<radius ? 1 : 0 > > -- mb > > > On Fri, Jun 6, 2014 at 8:28 PM, Zahirul ALAM <[email protected] > <javascript:>> wrote: > >> I guess one can do a for loop. But how do I vectorize the code? >> >> >> On Friday, 6 June 2014 20:27:46 UTC-4, Zahirul ALAM wrote: >>> >>> How would one implement a step function like behaviour in julia? In >>> mathematica one can write the following to create a circle with value of 1 >>> within the radius and 0 outside >>> >>> UnitBox[Sqrt[X^2 + Y^2]*0.5/radius]; >>> >>> X and Y are the coordinates. >>> >> >
