Charles Turner wrote:
> Hi all-
>
> Here's a little problem (not a homework assignment) that has me stumped.
>
> Take two rank 1 arrays:
>
> repeats =: 1 2 3 4
> values =: 13 14 15 16
>
> and want to repeat values such that the result is this rank 1 array:
>
> 13 14 14 15 15 15 16 16 16 16

How about

   ;#/&.><"1 repeats,.values
13 14 14 15 15 15 16 16 16 16

Best wishes,

John

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

Reply via email to