"Yuvaraj Athur Raghuvir" <[EMAIL PROTECTED]> wrote:
> I have a 2-D array T. I want a verb update as follows:
> (i;j;val) update T

Have you looked at } Amend? It replaces values using the same indexing
options as { From.
Furthermore, expressions of the form 'y =: x m} y'
are done in place, much like APL's 'y[m] <- x'
To replace a single value, use scatter indexing:

   [T =: 4 4 $ ?~ 16
 6 11  0  5
13  7  1  9
 8  4  2  3
10 12 15 14

   [T =: 42 (<1;3)} T
 6 11  0  5
13  7  1 42
 8  4  2  3
10 12 15 14

-- Mark D. Niemiec <[EMAIL PROTECTED]>

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

Reply via email to