Question: The code that I have posted is my MATLAB code that does NOT use partial pivoting. The questions is can you modify THIS code to
function x = myGaussJordan(A, b) % Start of function 5 C = [A, b1% Augmented form 7 % A is the left side of the matrix (system of equations) % b is the right side of the matrix (solutions) [n,p] = size (c) %size of the matrix 2 for k=1:n; % Loop over all rows E(k,k:p) C(k,k:p)/C(k,k); % Divide row #1 by pivot = for i = 1:n % To generate the in all rows besides the pivot row if ~=k % This is telling the scipt to continue in the case of i not equalling k end % end of if loop end % end of second loop end % end of first loop x = C( :, n+1:p) % Solution to the system, in Augumented Form end % end of funciton
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
