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

Description

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

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

Enter the coefficients of x.
Press R/S after each is entered.

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

Enter the constants.
Press R/S after each is entered.

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

Values for x are read out in turn.

Lines 10 and 20 could be replaced with f RAN# to explore the limits of matrix dimensioning. 64 elements are allowed using a HP15C so [A] should be no greater than 7x7. [B] would then be 7x1 and [C] would be 7x1 for a total of 63 elements.

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 elements in memory.

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 31 R/S 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 31 R/S 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