Contents

Aaron Klapheck

% In class 4-Mar-08
clear, clc, home
fprintf('The date and time: %s \n', datestr(now))
The date and time: 10-Apr-2008 08:53:32 

Notes

% Solving Systems of Equations
%
%   consistant: has a solution to the equation Ax=b
%       If rank of matrix A is equal to the rank of the augmented matrix
%       [A,b] then the system is consistent.
%
%
%   ****Test 2
%       Will not be making a GUI
%
%   Teacher did problem 10 on page 446 using a GUI she created.
%
%
%   Next class
%       fitting points to a graph: polyfit(x,y,n)
%

1. Solving Systems of Equations

%   1x1 + 2x2 - 5x3 = 4
%   1x1 - 1x2 - 1x3 = 0
%   7x1 + 5x2 + 2x3 = 6


clear, clc, home
fprintf('The date and time: %s \n \n', datestr(now))

disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')
disp('%                                                                %')
disp('%              Purpose: Solving Systems of Equations             %')
disp('%              Programer: Aaron Klapheck                         %')
disp('%                                                                %')
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%')


A = [1, 2, -5; 1, -1, -1; 7, 5, 2]
b = [4; 0; 6]
% if rankA = rankAb then the system is consistant.
rankA = rank(A)
rankAb = rank([A, b])
The date and time: 10-Apr-2008 08:53:33 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                %
%              Purpose: Solving Systems of Equations             %
%              Programer: Aaron Klapheck                         %
%                                                                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A =

     1     2    -5
     1    -1    -1
     7     5     2


b =

     4
     0
     6


rankA =

     3


rankAb =

     3