WP 34S matrix operations « Next Oldest | Next Newest »

 ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 10-10-2011, 05:16 AM I've added a number of matrix routines to the library/matrix.wp34s file. This along with Marcus's matrix editor is about half a flash region. We'd like to provide a full region of matrix functions if possible. My question is then "What extra functions should go in?" Suggestions are welcome, suggestions with code are better :-) These aren't going to be held to the same standard as the internal user code commands -- wreck the stack, use the lettered registers and flags and generally have fun. I am aware of these functions but thought I'd see what people wanted before diving in and doing the ones I find interesting (and probably completely useless). The existing functions in user code are: M.1 - Create an identity matrix from a descriptor in X. No stack damage, L changed. M.0 - Create an zero matrix from a descriptor in X. No stack damage, L changed. ATR - Return the sum of the absolute values of the matrix diagonal. TR - Return the trace of the matrix. M- - Matrix subtraction. M+ - Matrix addition. M.y - Multiply matrix by scalar. FNM - Frobenius norm. RNM - Row norm. CNM - Column norm. MFD - Find element in matrix. M^ - Find the maximum element in matrix. Mv - Find the minimum element in a matrix. Yes, these need better documentation. These are implemented internally and documented reasonably in doc/matrix.txt: M.TRN - Matrix transpose in-situ. M.times - Matrix multiply. M.+times - Matrix addition & scalar multiplication. M.R<-> - Matrix row swap. M.Rtimes - Multiply row by scalar. M.R+times - Multiply a row by a scalar and add to another row. M.IJ - Convert a register index to row/column indices. M.REG - Convert row/column indices to a register index. M.ALL - Return a loop index to iterate over the entire matrix. M.DIAG - Return a loop index to iterate over the diagonal of the matrix. M.ROW - Return a loop index to iterate over a row of the matrix. M.COL - Return a loop index to iterate over a column of the matrix. M.ROW? - Extract the row count from a matrix descriptor. M.COL? - Extract the column count from a matrix descriptor. M.SQR? - Check if a matrix descriptor is for a square matrix & execute the next step if not. M.COPY - Copy a matrix to another location. M.DET - Calculate the determinant of a matrix. M.LIN - Solve a system of linear equations. M.INV - Invert a matrix in-situ. This seems like a fairly good selection of operations. Their names might change, but the functions are very unlikely to. - Pauli ▼ Miguel Toro Member Posts: 239 Threads: 55 Joined: Sep 2006 10-10-2011, 07:57 AM May I suggest my little editor? Code is already there :-) Regards, Miguel ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 10-10-2011, 08:06 AM I did think about this one but didn't act. I'll put it in. - Pauli Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 10-10-2011, 08:15 AM And done. - Pauli Carey Junior Member Posts: 18 Threads: 4 Joined: Mar 2010 10-11-2011, 03:45 AM Please forgive if the following matrix functions were previously considered or require too many resources, but useful would be: * eigenvalues * eigenvectors * singular value decomposition (svd) * singular values Regards, Carey ▼ Paul Dale Posting Freak Posts: 3,229 Threads: 42 Joined: Jul 2006 10-11-2011, 03:50 AM All of these are under consideration, although I've coded none of them. I'm not sure how to deal with complex results, at least at the moment. - Pauli

 Possibly Related Threads... Thread Author Replies Views Last Post [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 946 12-10-2013, 11:37 PM Last Post: Les Bell WP-34S (Emulator Program Load/Save) Barry Mead 1 530 12-09-2013, 05:29 PM Last Post: Marcus von Cube, Germany AFTER HP-Prime update, Shift+Matrix CRASHES Joseph Ec 3 705 12-06-2013, 11:06 AM Last Post: Joseph Ec DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 749 12-04-2013, 11:14 AM Last Post: Barry Mead HP Prime Matrix TERRIBLE bug and question uklo 19 1,879 11-25-2013, 12:10 PM Last Post: Mic HP Prime: editing a matrix Alberto Candel 6 734 11-20-2013, 06:26 PM Last Post: Helge Gabert Absolute Value and Matrix BruceTTT 5 730 11-11-2013, 11:52 PM Last Post: Walter B WP 34S/43 ?'s Richard Berler 3 677 11-10-2013, 02:27 AM Last Post: Walter B My FrankenCulator (wp-34s) FORTIN Pascal 4 691 11-09-2013, 06:18 PM Last Post: FORTIN Pascal WP 34S Owner's Handbook Walter B 5 907 11-09-2013, 05:34 PM Last Post: Harald

Forum Jump: