(42S) Column Sums of a Matrix

07102016, 01:36 AM
Post: #1




(42S) Column Sums of a Matrix
HP 42S: Column Sums of a Matrix
This could potentially had been a medium to long sized programs involving loops, but thanks to the powerful function RSUM (found in CATALOGFUNC or executed by XEQ RSUM) this program will be quite short. RSUM is the row sum function, or the sum of each row of a matrix. Just put a matrix on the stack and run CSUM. When the program is finished, press [shift] [ 9 ] (MATRIX), {EDIT} to see the sums. Code: 00 {12Byte Prgm} Test: MAT1 = [ [4, 3, 1], [5, 8, 2], [7, 6, 3]] Result: [16, 17, 6] 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)