5-Number Summary Calculation for the HP 42s
|
10-24-2024, 06:17 PM
(This post was last modified: 10-24-2024 06:19 PM by Gjermund Skailand.)
Post: #2
|
|||
|
|||
RE: 5-Number Summary Calculation for the HP 42s
Hi,
here is a building block that you may find useful. It sorts a column or matrix using the first column as index. It illustrates some "advanced" techniques on the HP42S input on stack: matrix [m,1] or matrix[m,n] output : sorted matrix 00 { 35-Byte Prgm } 01 LBL "SORT" 02 STO "." 03 INDEX "." 04 1 05 LBL 00 06 [MIN] @ get index and value of minimum row from current position 07 Rd 08 R<>R @ swap current row with the minimum row 09 ISG ST Y 10 CLX @ on DM42, Free42 use NOP 11 Rd 12 I+ 13 FC? 76 @ row index not wrapped? 14 GTO 00 15 RCL "." Notes Rd means the R_down_arrow [MIN] must on the HP42s be entered as XEQ "[MIN]", on DM42/Free42 you can find it at end of the CATALOG/FCN menu. [MIN] searches from indexed position to end of column, returns position of minimum value in Y, and minimum value in X Similar with [MAX] In case you want to modify the program to sort on a different column, say i, then insert after line 4: i STOIJ X<>Y mvh Gjermund |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
5-Number Summary Calculation for the HP 42s - cylurian - 10-23-2024, 10:11 PM
RE: 5-Number Summary Calculation for the HP 42s - Gjermund Skailand - 10-24-2024 06:17 PM
RE: 5-Number Summary Calculation for the HP 42s - cylurian - 10-24-2024, 10:00 PM
RE: 5-Number Summary Calculation for the HP 42s - Paul Dale - 10-24-2024, 10:08 PM
RE: 5-Number Summary Calculation for the HP 42s - cylurian - 10-24-2024, 10:17 PM
RE: 5-Number Summary Calculation for the HP 42s - Jaco@cocoon-creations.com - 10-25-2024, 04:57 AM
RE: 5-Number Summary Calculation for the HP 42s - Paul Dale - 10-25-2024, 01:24 AM
|
User(s) browsing this thread: 2 Guest(s)