On 3/28/08, Robert O'Boyle <[EMAIL PROTECTED]> wrote:
> if. (index_a { list_a) = 0
> do.
> list_b =. list_b, (+/%#) index_b { list_b
> else.
> list_b =. list_b, index_a { list_a
> end.

Note that a "general" way of approaching this
would create a modified version of list_a with
averaged values from list_b plugged in for its
zeros.

Then you would no longer have an if statement,
you would just use index_a { list_a2.  Or, possibly,
you would not use indices at all (if list_a2 could
be transformed as a whole).

Of course, this approach may or may not make
sense, depending on your surrounding context.

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

Reply via email to