#*****************************************************************************80 # ## rrefmatrix_test tests rrefmatrix. # # Licensing: # # Copyright 2016 James P. Howard, II # # The computer code and data files on this web page are distributed under # https://opensource.org/licenses/BSD-2-Clause, the BSD-2-Clause license. # # Modified: # # 24 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "rrefmatrix_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " rrefmatrix(A) computes the row reduced echelon form (RREF) of a matrix.\n" ) source ( "/home/burkardt/public_html/r_src/rrefmatrix/rrefmatrix.R" ) cat ( "\n" ) A <- matrix ( c ( 5, 5, 5, 8, 2, 2, 6, 5, 4 ), 3 ) cat ( "\n" ) cat ( "The matrix A:\n" ) cat ( "\n" ) A Aref <- rrefmatrix ( A ) cat ( "\n" ) cat ( "The RREF of A:\n" ) cat ( "\n" ) Aref B <- matrix ( c ( 2, 4, 2, 4, 9, 4, 3, 6, 7, 7, 3, 9 ), 3 ) cat ( "\n" ) cat ( "The matrix B:\n" ) cat ( "\n" ) B Bref <- rrefmatrix ( B ) cat ( "\n" ) cat ( "The RREF of B:\n" ) cat ( "\n" ) Bref C <- matrix ( c ( 2, 8, 5, 5, 1, 2, 3, 8, 4 ), 3 ) cat ( "\n" ) cat ( "The matrix C:\n" ) cat ( "\n" ) C Cref <- rrefmatrix ( C ) cat ( "\n" ) cat ( "The RREF of C:\n" ) cat ( "\n" ) Cref # # Terminate. # cat ( "\n" ) cat ( "rrefmatrix_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )