On Tue, Sep 9, 2008 at 17:00, David Vincent-Jones <[EMAIL PROTECTED]> wrote:
> I am having problems correctly replacing in this context:
>   [c=: 2{ "1 abc

In addittion to the replies Sherlock, Ric have given, here's another
possibility.  Use an index value that selects index 2 on axis 2 and
all indices on axis 0 and 1.

   abc =: i. 2 2 3
   ]i =: <a:;a:;2
+---------+
|+--+--+-+|
||++|++|2||
|||||||| ||
||++|++| ||
|+--+--+-+|
+---------+
   ]c =: i { abc
2  5
8 11
   c2 =: c*2
   c2 i} abc
0  1  4
3  4 10

6  7 16
9 10 22

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

Reply via email to