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

Reply via email to