Post Reply 
(15C) 3 Equations with 3 Unknowns
03-17-2024, 03:16 PM (This post was last modified: 03-17-2024 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 HP-15C is able to do much more! This is not a simple TI-30X PRO which is limited to two or three equation systems only.

[Image: attachment.php?aid=13380]

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 HP-15Cs 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 HP-15C (and certainly up to 7 on the extended HP-15Cs - please tell me).

[Image: attachment.php?aid=13381]

* 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\}\\ \)

[Image: attachment.php?aid=13379]

And a resolution of a system of 5 equations with 5 unknowns allowing us to verify on our HP-15C 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.


Attached File(s) Thumbnail(s)
           
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(15C) 3 Equations with 3 Unknowns - Gamo - 03-15-2024, 06:43 AM
RE: (15C) 3 Equations with 3 Unknowns - C.Ret - 03-17-2024 03:16 PM



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