[WP 34S] Working with matrices - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: Not HP Calculators ( /forum-7.html)+--- Forum: Not quite HP Calculators - but related ( /forum-8.html)+--- Thread: [WP 34S] Working with matrices ( /thread-433.html) |

[WP 34S] Working with matrices - Michael de Estrada - 01-14-2014 05:57 PM
Now that I have the printed manual and had the opportunity to read it in more detail, I am somewhat shocked at the rather primitive nature of matrix handling on the WP 34S as compared to the HP 42S, or even the HP 15C. There is no matrix data type on the WP 34S, and matrices are defined by "descriptors" that point to a range of data registers where the matrix elements are stored. Matrix elements cannot be selected by their normal two digit row/column id, and instead it's up to the user to write down and remember which register contains which element. Furthermore, direct math operations cannot be performed e.g. RCL MAT1 RCL MAT2 x. In order to do this on the WP 34S one has to do something like RCL 89 RCL 99 70 h MATRIX Mx, where registers 89 and 99 contain the matrix descriptors and 70 is the base address for the result, which is not checked by the OS for overlap. In order to perform the equivalent of RCL MAT1 RCL MAT2 +, the only matrix operation I could find is M+x, which does not designate a result matrix and will overwrite the X matrix. To avoid this problem, one must first copy the X matrix to another non-overlapping set of registers something like RCL 89 RCL 99 70 h MATRIX M.COPY h MATRIX M+x. On the HP 15C, one simply defines data matrices A and B, and a result matrix C, where the results of all operations are automatically stored without overwriting the original matrices. For example, I wrote the following program function for my HP 15C to use with the Solver to find eigenvalue roots: PHP Code: `LBL A` Where the operation MATRIX 9 is the determinant. Also, prior to execution, The result matrix C was created with the same dimension as A and B. On the WP 34S this became: PHP Code: `LBL 'EGV'` Which is far more cumbersome and difficult to understand IMO. Of course, I may have missed something here, and welcome any input if there is a better way to do this. RE: [WP 34S] Working with matrices - Paul Dale - 01-14-2014 10:12 PM
You've got it correct. The matrix handling on the 34S isn't user friendly. There isn't space in the numeric format to allow matrix descriptors (or even binary integers which is why we can't support both simultaneously) like the 15C. We don't have the concept of a typed stack like the 42S so we can't use that approach either. On the plus side, the matrix operations are highly accurate - Pauli RE: [WP 34S] Working with matrices - Michael de Estrada - 01-16-2014 01:12 AM
Speaking of simple elegance, here's the code for the HP 42S: PHP Code: `LBL "FREQ"` |