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. >
