HP-15C Owner's Handbook - Pages 138-140 - Solve a system of linear equations - Random version - up to 8 equations each with 8 coefficients and 1 constant

Description

N GSB 1 where N is the number of equations (8 or less).

A N N is displayed.
Matrix [A] has a dimension of NxN.

Random coefficients of xi are entered automatically where i has values from 1 to N

B N 1 is displayed.
Matrix [B] has a dimension of Nx1.

Random constants are entered automatically.

C N 1 is displayed.
Matrix [C] has a dimension of Nx1.

Values for xi are read out in turn.

Lines 10 and 20 could be replaced with f R/S to allow manual data entry. 64 elements are allowed using a standard HP15C so [A] should in principle be no greater than 7x7. [B] and [C] would then each be 7x1 for a total of 63 elements. In practice, because the program occupies some memory space, only 6 equations can be solved with a standard HP15c. In this case a 6x6, and two 6x1 matrices are required, while leaving some space for the program.

The simulator seems to be able to solve 8 equations, each with 8 coefficients and 1 constant. Including the 8x1 result matrix [C], this is 80 matrix elements in memory. This works for the expanded-memory modes of both the Simulator and the DM15L.

John Patterson
jepattersonatactrix.co.nz
http://www.jepspectro.com

Program Resources

Labels

Name Description Name Description
 A Read the matrix elements in [A]  3 Enter constants
 B Read the matrix elements in [B] .1 Matrix [A] readout loop
 C Read the matrix elements in [C] .2 Matrix [B] readout loop
 1 Run Program .3 Matrix [C] readout loop
 2 Enter coefficients of x

Flags

Number Description
8 gCF8 clear complex number flag

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 018 42 31 f PSE 036 22 .1 GTO . 1
001 42;21; 1 f LBL 1 019 42;21; 3 f LBL 3 037 43 32 g RTN
002 43; 5; 8 g CF 8 020 42 36 f RAN # 038 42;21;12 f LBL B
003 42;16; 0 f MATRIX 0 021 u 44 12 USER STO B 039 42;16; 1 f MATRIX 1
004 36 ENTER 022 22 3 GTO 3 040 42;21; .2 f LBL . 2
005 42;23;11 f DIM A 023 3 3 041 42 31 f PSE
006 42;16; 1 f MATRIX 1 024 45;16;12 RCL MATRIX B 042 u 45 12 USER RCL B
007 45;16;11 RCL MATRIX A 025 42 31 f PSE 043 22 .2 GTO . 2
008 42 31 f PSE 026 45;16;11 RCL MATRIX A 044 43 32 g RTN
009 42;21; 2 f LBL 2 027 42;26;13 f RESULT C 045 42;21;13 f LBL C
010 42 36 f RAN # 028 10 ÷ 046 42;16; 1 f MATRIX 1
011 u 44 11 USER STO A 029 32 13 GSB C 047 42;21; .3 f LBL . 3
012 22 2 GTO 2 030 43 32 g RTN 048 42 31 f PSE
013 45;23;11 RCL DIM A 031 42;21;11 f LBL A 049 u 45 13 USER RCL C
014 42;16; 1 f MATRIX 1 032 42;16; 1 f MATRIX 1 050 22 .3 GTO . 3
015 1 1 033 42;21; .1 f LBL . 1 051 43 32 g RTN
016 42;23;12 f DIM B 034 42 31 f PSE
017 45;16;12 RCL MATRIX B 035 u 45 11 USER RCL A