matrix_column_sum_test <- function ( ) #*****************************************************************************80 # ## matrix_column_sum_test() computes matrix column sums using einsum(). # # Licensing: # # This code is distributed under the MIT license. # # Modified: # # 07 August 2026 # # Author: # # John Burkardt # library ( 'einsum' ) require ( 'einsum' ) cat ( '\n' ) cat ( ' matrix_column_sum_test():\n' ) A = matrix ( c ( 11, 12, 13, 21, 22, 23, 31, 32, 33 ), nrow = 3, ncol = 3, byrow = TRUE ) cat ( '\n' ) cat ( ' A:\n' ) print ( A ) cat ( '\n' ) Ac = einsum ( 'ij -> j', A ) cat ( '\n' ) cat ( ' Ac = einsum ( \'ij -> j\', A ):\n' ) print ( Ac ) cat ( '\n' )