My version:

NB. Read in data, convert to numeric

sfr =: 0&".@> sfr (3 8 16&{)@;:;._2 wd 'clippaste'

NB. Calculate distances

>./ (0&{ * (_,1&{) ([ #. <.) 2503 #:~ (0,+/@(1 2&{)))"1 sfr


NB. Part 2. Total rewrite required

>./ +/"1 (="1 >./) +/\"1 (2503 $ *`(1 0 #~ ,)/)"1 sfr



Henry Rich



On 12/14/2015 6:45 AM, Ryan Eckbo wrote:
I don't understand what Y is, could you explain that?

On 14 Dec 2015, at 17:10, 'Pascal Jasmin' via Programming wrote:

in =. ". leaf (3 8 _2 { ;:)"1 a =. > cutLF wdclippaste ''
Y =: (&({::))(@:])

part1 :

./ {:"1 +/\@(2503 $ (0 #~  2 Y) ,~ 1 Y # 0 Y)"1 in
2:

./ (] +/@(="1 1) >./) +/\@(2503 $ (0 #~  2 Y) ,~ 1 Y # 0 Y)"1 in
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to