Gauss

Embed Size (px)

DESCRIPTION

Gauss

Citation preview

rrefmovie(A,tol)function rrefmovie(A,tol)%RREFMOVIE Movie of the computation of the reduced row echelon form.% RREFMOVIE(A) produces the reduced row echelon form of A.% RREFMOVIE, by itself, supplies its own 8-by-6 matrix with rank 4.% RREFMOVIE(A,tol) uses the given tolerance in the rank tests.% Copyright 1984-2002 The MathWorks, Inc. % $Revision: 35 $ $Date: 2009-05-29 15:27:34 +0100 (Fri, 29 May 2009) $% Sample matrix if none was provided.Old_Format=get(0,'Format');if nargin < 1 A = [ 9 4 1 6 12 7 4 0 4 15 1 14 7 0 7 8 10 9 16 0 16 3 13 2 0 2 -4 0 0 0 0 6 -12 0 0 0 9 0 9 6 12 7 5 0 5 10 8 11];endformat ratmore offclchomedisp(' Original matrix')Adisp('Press any key to continue. . .'), pause(0.1)[m,n] = size(A);% Compute the default tolerance if none was provided.if (nargin < 2), tol = max([m,n])*eps*norm(A,'inf'); end% Loop over the entire matrix.i = 1;j = 1;k = 0;while (i