Try this for the second verb: 13 : '(t-I*+/"1) [t=.(-. [I=.=/~i.#y)*y'
but... if I do understand your objective well, then this is what you want: 13 : '(I*+/"1 y)-~ ([EMAIL PROTECTED])*y' X _10 1 2 3 4 5 _35 7 8 9 10 11 _60 13 14 15 16 17 _85 19 20 21 22 23 _110 =@@i Roelof K Brouwer schreef: > > > > > > > repl_diag_by_minus_sum_of_row=: 3 : 't-I*+/"1 t=.(-.I=.=/~i.#y)*y' > > > > repl_diag_by_minus_sum_of_row=: 13 : 't-I*+/"1 t=.(-.I=.=/~i.#y)*y' > > > > applying them to i.5 5 gives two different results with the 2nd giving an > unintended result > > does anybody know why > > the objective is to replace the diagonal in a square array by the sums of > the elements in their rows > > > > cheers > > > > Roelof > > > > > > > > > > > > > > > > > > > > > > > > > > > > Dr. Roelof K. Brouwer PEng PhD > > http://www.tru.ca/faculty/rbrouwer > > Professor Emeritus > > School of Advanced Technologies and Mathematics > > Thompson Rivers University > > 900 McGill Road, PO Box 3010 > > Kamloops, BC, Canada,V2C 5N3 > > > > 1 250 374 5874 home > > 1 250 828 5219 work > > 1 250 377 6133 fax > > email [EMAIL PROTECTED] > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
