u=: [EMAIL PROTECTED]
v=: %:@]

   0 1 0 0 1 ([EMAIL PROTECTED]([=&1))"0 0 [ 1 2 3 4 5
0 1.414213562 1.098612289 1.386294361 2.236067977

=@@i

L.Tomei schreef:
> I have an array y, an array of booleans x (same shape of y), and two monadic
> verbs u and v.
> How can I apply verb u to each atom of y when corresponding value of x is 0,
> and verb v when corresponding value of x is 1?
> Thank you.
>
> L.Tomei
>   
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to