POLYMATH Report          LEQ 
 Linear Equations 2016-May-30 

Linear Equations Solution
    Variable Value
1 a 54
2 c -2
3 b -4

The equations
[1] a + 2·c = 50
[2] -c + b = -2
[3] a + 23·c - b = 12

Problem source text
# S. 1 - Linear Eqs.
# Simple linear equations system
#Verified Solution: a = 54, b = -2 , c = -4
a + 2*c = 50
b = -2 + c
a + 23*c = 12 + b

Coefficients matrix and beta vector
    a c b beta
1 1 2 0 50
2 0 -1 1 -2
3 1 23 -1 12

Matlab formatted problem
Create m file called PolyLEQ.m and paste the following text into it.
% S. 1 - Linear Eqs.
% Simple linear equations system
% Verified Solution: a = 54, b = -2 , c = -4
clc;
A = [ 1 2 0 ; 0 -1 1 ; 1 23 -1 ];
beta = [ 50 ;-2 ; 12 ];
x = A \ beta;
fprintf('a = %16.6f \n',x(1));
fprintf('c = %16.6f \n',x(2));
fprintf('b = %16.6f \n',x(3));

General Settings
Number of equations: 3
Reporting digits: 8
Elapsed time: 0.00 sec