function table_io_test04 ( ) %% TABLE_IO_TEST04 tests ITABLE_HEADER_READ, ITABLE_DATA_READ. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 13 May 2005 % % Author: % % John Burkardt % input_filename = 'itable_05_00020.txt'; fprintf ( 1, '\n' ); fprintf ( 1, 'TEST04\n' ); fprintf ( 1, ' For data stored in an integer TABLE file,\n' ); fprintf ( 1, ' ITABLE_HEADER_READ reads the header information\n' ); fprintf ( 1, ' (about the dimensions of the data);\n' ); fprintf ( 1, ' ITABLE_DATA_READ reads the data.\n' ); [ m, n ] = itable_header_read ( input_filename ); fprintf ( 1, '\n' ); fprintf ( 1, ' Read the header of %s\n', input_filename ); fprintf ( 1, '\n' ); fprintf ( 1, ' Spatial dimension M = %d\n', m ); fprintf ( 1, ' Number of points N = %d\n', n ); table = itable_data_read ( input_filename, m, n ); fprintf ( 1, '\n' ); fprintf ( 1, ' Read the data in %s\n', input_filename ); i4mat_print_some ( m, n, table, 1, 1, 5, 5, ... ' 5x5 portion of data read from file:' ); return end