## [41C] Linear Equations Solver for four Unknown

Contributed programs for the DM41 go here.
Dani R.
Posts: 307
Joined: Fri May 05, 2017 10:23 pm

### [41C] Linear Equations Solver for four Unknown

What it is? It is a linear equations solver.
What does it do? It solves a system of four linear equations containing the same set of variables.

At startup the program "a=?" is queried, i.e. you have to enter a11.
R/S, "b=?" is prompted, you must enter a12.
R/S, "c=?" is prompted, you must enter a13.
R/S, "d=?" is prompted, you must enter a14.
R/S, "res=?" is prompted, you must enter b1.
R/S → a21 for "a=?", R/S → a22 for "b=?", R/S → a23 for "c=?", R/S → a24 for "d=?", R/S → b2 for "res=?".
R/S → a31 for "a=?", R/S → a32 for "b=?", R/S → a33 for "c=?", R/S → a34 for "d=?", R/S → b3 for "res=?".
R/S → a41 for "a=?", R/S → a42 for "b=?", R/S → a43 for "c=?", R/S → a44 for "d=?", R/S → b4 for "res=?".
As you can see, improvements are possible for the input of variables, to be more precise.
R/S, you get "X=...." representing x1.
R/S, you get "Y=...." representing x2.
R/S, you get "Z=...." representing x3.
R/S, you get "T=...." representing x4.

There is no use for this program if you have a calculator with matrix. But the DM41(L) has no MathPac installed.
(1982/1983, 2019)
GPL v2

Listing:

Code: Select all

LBL "GLG 4 U"
1.02
STO 00
LBL 00
"a=?"
PROMPT
STO IND 00
ISG 00
"b=?"
PROMPT
STO IND 00
ISG 00
"c=?"
PROMPT
STO IND 00
ISG 00
"d=?"
PROMPT
STO IND 00
ISG 00
"RES=?"
PROMPT
STO IND 00
ISG 00
GTO 00
RCL 01
ST/ 02
ST/ 03
ST/ 04
ST/ 05
RCL 02
RCL 06
*
ST- 07
RCL 03
RCL 06
*
ST- 08
RCL 04
RCL 06
*
ST- 09
RCL 05
RCL 06
*
ST- 10
RCL 02
RCL 11
*
ST- 12
RCL 03
RCL 11
*
ST- 13
RCL 04
RCL 11
*
ST- 14
RCL 05
RCL 11
*
ST- 15
RCL 02
RCL 16
*
ST- 17
RCL 03
RCL 16
*
ST- 18
RCL 04
RCL 16
*
ST- 19
RCL 05
RCL 16
*
ST- 20
RCL 07
ST/ 08
ST/ 09
ST/ 10
RCL 08
RCL 12
*
ST- 13
RCL 09
RCL 12
*
ST- 14
RCL 10
RCL 12
*
ST- 15
RCL 08
RCL 17
*
ST- 18
RCL 09
RCL 17
*
ST- 19
RCL 10
RCL 17
*
ST- 20
RCL 13
ST/ 14
ST/ 15
RCL 14
RCL 18
*
ST- 19
RCL 15
RCL 18
*
ST- 20
RCL 19
ST/ 20
RCL 14
RCL 20
*
ST- 15
RCL 08
RCL 15
*
ST- 10
RCL 09
RCL 20
*
ST- 10
RCL 02
RCL 10
*
ST- 05
RCL 03
RCL 15
*
ST- 05
RCL 04
RCL 20
*
ST- 05
SF 21
"X="
ARCL 05
AVIEW
"Y="
ARCL 10
AVIEW
"Z="
ARCL 15
AVIEW
"T="
ARCL 20
AVIEW
END
DM42 SN:00032