#*****************************************************************************80 # ## choleskymatrix_test tests choleskymatrix. # # 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: # # 15 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "choleskymatrix_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " choleskymatrix(A) computes the Cholesky L L' factorization of a matrix.\n" ) source ( "/home/burkardt/public_html/r_src/choleskymatrix/choleskymatrix.R" ) cat ( "\n" ) A <- matrix ( c ( 5, 1, 2, 1, 9, 3, 2, 3, 7 ), 3 ) cat ( "\n" ) cat ( "The matrix A:\n" ) cat ( "\n" ) A L <- choleskymatrix ( A ) cat ( "\n" ) cat ( "The L Cholesky factor of A:\n" ) cat ( "\n" ) L LTL <- L %*% t(L) cat ( "\n" ) cat ( "The product L L':\n" ) cat ( "\n" ) LTL # # Terminate. # cat ( "\n" ) cat ( "choleskymatrix_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )