One way to achieve that would be

mat =: (+0=i.@#)"1 mat
and
mat =: (+2=i.@#) mat


Am 06.02.22 um 20:24 schrieb Andrew P:
- Add 1 to each value in the first column
x[:,1] += 1
- Add 1 to each value in the third row
x[3,:] += 1

--
----------------------
mail written using NEO
neo-layout.org
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to