(15C) 3 Equations with 3 Unknowns

03152024, 06:43 AM
(This post was last modified: 03182024 09:22 AM by Gamo.)
Post: #1




(15C) 3 Equations with 3 Unknowns
HP15C already got the Matrix Solver function but
the Setup Process is tedious and timeconsuming. With this little program it help to eliminate most of the setup process, user only input data for the Rows and Columns.  Procedure: [USER] mode Initialize press [D] display 3 Input Data press [R/S] on each rows from left to right Press [E] Input Data [R/S] input data the columns from top to buttom When done display should shown [ C 3 1 ] [R/S] display answer for X [R/S] display answer for Y [R/S] display answer for Z  Program: input program in [USER] mode Quote:LBL D Example: [USER] mode 4X + 2Y  2Z = 8 X + Y + Z = 7 2X + 2Y + Z = 12 Press [D] display 3 4 [R/S] 2 [R/S] 2 [CHS] [R/S] 1 [R/S] 1 [R/S] 1 [R/S] 2 [R/S] 2 [R/S] 1 [R/S] display 1 Pres [E] display 1 8 [R/S] 7 [R/S] 12 [R/S] display [ C 3 1 ] [R/S] display answer for X = 1 [R/S] display answer for Y = 4 [R/S] display answer for Z = 2 For Determinant press [X<>Y] display answer 2 Gamo 3/2024 

03152024, 06:46 AM
Post: #2




RE: (15C) 3 Equations with 3 Unknowns
A nice, useful, program!
Thank you! 

03162024, 02:49 PM
Post: #3




RE: (15C) 3 Equations with 3 Unknowns
It is a great program.
I kind of had to redo it a bit because of the USER mode and how I couldn't get the pointer (R0,R1) to advance on the HP 15C Collector's Edition. Code: (34 steps) 

03162024, 10:40 PM
Post: #4




RE: (15C) 3 Equations with 3 Unknowns
(03162024 02:49 PM)Eddie W. Shore Wrote: It is a great program. Eddie, I have not read the above closely, but are you suggesting you have found some behavior where the 15C and 15c CE act differently? If so, please try to isolate it and summarize the exact steps to perform on both, to see if there is indeed different behavior. Thx Bob Prosperi 

03172024, 01:10 AM
Post: #5




RE: (15C) 3 Equations with 3 Unknowns
Eddie W. Shore: Thank for the interest with this program
In order to do the "Store and Recall" Matrix in program it have to be in [USER] mode since it is store in Lable. So to enter this the [f] key must be use like STO A enter as [STO] [f] [A] To run the Determinant somehow not work in program. I try to program [RCL] [MATRIX] [A] [MATRIX] 9 and with this in program also make the whole program to give wrong answer. The X and Y give correct answer but not the Z Gamo 

03172024, 03:16 PM
(This post was last modified: 03172024 06:40 PM by C.Ret.)
Post: #6




RE: (15C) 3 Equations with 3 Unknowns
Bonjour à toutes et à tous.
This program is a really good idea. Just having to press the (R/S) key saves time and avoids errors by limiting typing. But why limit this only to the case where there are three equations? The HP15C is able to do much more! This is not a simple TI30X PRO which is limited to two or three equation systems only. On the other hand, as we see on this screenshot, on the Ti X PRO there is a very nice feature: the equations are entered in order, left and right part for each row. By memorizing the number of equations in the index register I, I was able to make the GAMO's code more general. I would like to share this new version with you so that anyone can test it and tell us if it is operational (or not). The number of equations is given as a parameter at start. It uses the fact that the uSTO/uRCL matrix instructions are also used for conditional jumps at the end of each matrix. As long as we're at it, and now that certain HP15Cs have extended memory, the fact this new code is more complicated than that of GAMO proposed will no more be a problem. I hope that any larger system of equations will be easier to work out. Or at least as easy as with 3x3 GAMO's code. In order to enter each equation as on the actual CASIO, TI or SHARP machines, namely in order, left part then right term line by line, the A matrix is reDIMed after each row entry. So the code below can be used for systems ranging from 1 to 6 equations on an original HP15C (and certainly up to 7 on the extended HP15Cs  please tell me). * Please note; the instructions on lines 016u STO A and 025u STO B must be entered in USER mode (and the small u must be visible in the code) # The display format instructions from lines 015 and 024 can be modified at the user's convenience. These are respectively the numerical format for displaying the coefficients of the equations during inputs and the format of the final solutions of the system. In this short version of my code, no provision for code exist to list the solutions by pressing only one key. System solutions have to be obtained in USER Mode keying (RCL)(C). The label of the solution is momentary display (nice feature when numerous variable are present). If one prefer to just have to press on the (R/S) key, coding a loop at the end of the code can be easy achieved. Here is an illustration of the input for the example of GAMO: \( \left\{\begin{matrix} 4 & 2 & 2 \\ 1 & 1 & 1 \\ 2 & 2 & 1 \\ \end{matrix} \, \, \left \begin{matrix} 8 \\ 7 \\ 12 \\ \end{matrix}\right.\right\}\\ \) And a resolution of a system of 5 equations with 5 unknowns allowing us to verify on our HP15C the results obtained here (YouTube video) using a Japanese FACOM 128B relay computer from 1958. f USER 5 g RTN R/S 1. 2 R/S 3 R/S 4 R/S 5 CHS R/S 6 R/S 1. 3 R/S 2. 1 R/S 1 R/S 2 CHS R/S CHS R/S CHS R/S 2. 0.4 R/S 3. 3 R/S 3 R/S 4 CHS R/S 1 R/S 6 CHS R/S 3. 0.7 R/S 4. 1 R/S 4 CHS R/S 5 R/S 6 CHS R/S 5 R/S 4. 0.05 R/S 5. 1 CHS R/S 2 CHS R/S 3 R/S 2 R/S 1 R/S 5. 0.15 R/S C 5 1 RCL C C 1,1 500.0000 03 (= 1/2 ) RCL C C 2,1 333.3333 03 (= 1/3 ) RCL C C 3,1 250.0000 03 (= 1/4 ) RCL C C 4,1 200.0000 03 (= 1/5 ) RCL C C 5,1 166.6667 03 (= 1/6 ) Comments and suggestions are both welcome. 

03172024, 03:21 PM
Post: #7




(15C CE) n Equations with n Unknowns
I had no intention of using the HP15C CE for matrix calculations, as the HP Prime is better in that regard. But on the way home from a business trip I was bored (as a passenger of course) so I read the HP15C CE manual and its matrix capabilities. Then when I opened this forum at home, this new thread jumped out at me. :)
Here is a program to solve n linear equations: 1) type n and press A 2) entering the elements of matrix A and then matrix B using R/S 3) after entering all elements of both matrices, cycle through the resulting matrix C using R/S. Code: 001 42,21,11 LBL A Prime G2, 15C CE 

03172024, 03:33 PM
(This post was last modified: 03172024 03:36 PM by C.Ret.)
Post: #8




RE: (15C) 3 Equations with 3 Unknowns
Hi CHROMOS,
Nice code ! Your program is strangely close to the one I made before changing the order of the inputs. Not mixing matrix A and B inputs really shorten the code length. Anyone who prefer to have easy listing of the solutions using only the R/S key, may simply add the line 022 to 027 from CHROMOS code at the end of my code version. 

03182024, 09:42 AM
Post: #9




RE: (15C) 3 Equations with 3 Unknowns
Thanks everyone that interest about this program.
I have made a little addon to my program to include the answer for the Determinant. The code look a bit strange that have to put the [R/S] and [PSE] code in it in order to run program smoothly without error. Here is another example: 4X + 5Y  2Z = 14 7X  Y + 2Z = 42 3X + Y + 4Z = 28 Go ahead and Press D then enter data each rolls from left to right Then Press E and enter data column from top to buttom Continue [R/S] answer should be X = 4, Y = 4 and Z = 5 Press [X<>Y] to view Determinant and answer is 154 Gamo 

« Next Oldest  Next Newest »

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