#*****************************************************************************80 # ## refmatrix_test tests refmatrix. # # 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: # # 09 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "refmatrix_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " refmatrix(A) computes the row echelon form (REF) of a matrix.\n" ) source ( "/home/burkardt/public_html/r_src/refmatrix/refmatrix.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 <- refmatrix ( A ) cat ( "\n" ) cat ( "The REF 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 <- refmatrix ( B ) cat ( "\n" ) cat ( "The REF 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 <- refmatrix ( C ) cat ( "\n" ) cat ( "The REF of C:\n" ) cat ( "\n" ) Cref # # Terminate. # cat ( "\n" ) cat ( "refmatrix_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )