Brian, thank you! That is exactly what I needed. (] %~ 4 |.!.0 ]) (1+i.4),(1.25+i.4) 1.25 1.125 1.08333 1.0625 0 0 0 0
I should have thought of that. I was thinking of it as a selection solution and not an array solution. I used shift the other day with my line detection logic. I have a well worn print-out of the J Reference card which has it identified too -- incidentally right where my thumb was holding the paper! Thanks again Joe On Fri, Feb 21, 2014 at 7:17 PM, Brian Schott <[email protected]>wrote: > Joe, > > I think you are looking for shift as discussed here. > http://jsoftware.com/help/dictionary/d231.htm > > If you think I am right and want more, let me know. > > > On Fri, Feb 21, 2014 at 5:58 PM, Joe Bogner <[email protected]> wrote: > > > is there a better way to do this? Calculate change over the 4th or Nth > > previous cell? > > > > > > d=.(1+(i.4)),(1.25+(i.4)) > > > > d %~ ((# d) {. _4 {. d) > > > > 1.25 1.125 1.08333 1.0625 0 0 0 0 > > > > > > -- > (B=) > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
