Post Reply 
[WP 34S] Working with matrices
01-14-2014, 05:57 PM (This post was last modified: 01-16-2014 02:50 PM by Michael de Estrada.)
Post: #1
[WP 34S] Working with matrices
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
RCL MATRIX B
X
RCL MATRIX A
-
MATRIX 9
RTN 

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'
+/-
RCL 89
RCL 99
70
M
.COPY
M
+x
DET
RTN 

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.
Find all posts by this user
Quote this message in a reply
01-14-2014, 10:12 PM
Post: #2
RE: [WP 34S] Working with matrices
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 Smile


- Pauli
Find all posts by this user
Quote this message in a reply
01-16-2014, 01:12 AM (This post was last modified: 01-16-2014 03:20 AM by Michael de Estrada.)
Post: #3
RE: [WP 34S] Working with matrices
Speaking of simple elegance, here's the code for the HP 42S:

PHP Code:
LBL  "FREQ"
MVAR "EGV"
RCL  "EGV"
RCLx "MASS"
RCL"STIF"
DET
END 
Find all posts by this user
Quote this message in a reply
Post Reply 




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