Hi,
In trying to create a circularly symmetric sinc 2-d function
I have run into a surprising, difficult to isolate crash.
It seems that the array can be created but crashes occur
if the "v" below is used after the creation line in the examples
below. It has never crashed for me with size "15", sometimes does
for "16", and seems to consistently crash for "200".
Is this a known bug or problem with my system (windows xp64 running
32 bit J6.02; J64 seems to hang rather than crash)? BTW, "plot"
has nothing to do with the problem as far as I know, but it
illustrates how simple and non threatening the data is.
Best, Cliff
load 'plot'
sinc=:(sin%])`1:@.(=&0)"0
x=:0.1*i:200
g=:+&.:*:"0
y=:g/~ 0.1*i:200
'density' plot y
2 2{.v=:sinc y=:g/~ 0.1*i:15
>./,y
>./,v NB. OK
'density' plot v
2 2{.v=:sinc y=:g/~ i:16
>./,y
>./,v NB. usually crashes
2 2{.v=:sinc y=:g/~ 0.1*i:200
>./2 2{.v NB. crashes when v is used
--
Clifford A. Reiter
Mathematics Department, Lafayette College
Easton, PA 18042 USA, 610-330-5277
http://www.lafayette.edu/~reiterc
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm