Here is a tacit version using close to the same algorithm that you propose below:
seq=: {.@[ + ] * -~/@[ i.@>:@<.@% ] (2 5) seq 0.25 2 2.25 2.5 2.75 3 3.25 3.5 3.75 4 4.25 4.5 4.75 5 On Thu, Aug 23, 2012 at 9:07 PM, Skip Cave <s...@caveconsulting.com> wrote: > I would like to generate a vector sequence of numbers starting from s and > going to e, with increment i > here is an explicit function for that: > s + i * i. 1 + (e-s) % i > > s =. 2 > e =. 5 > i =. 0.25 > > s + i * i. 1 +(e-s) % i > 2 2.25 2.5 2.75 3 3.25 3.5 3.75 4 4.25 4.5 4.75 5 > > what would the tacit form of the sequence verb look like, if we defined the > dyadic verb seq thus: > (s,e) seq i > > -- > Skip Cave > Cave Consulting LLC > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm