function table_io_test03 ( ) %% TABLE_IO_TEST03 tests ITABLE_WRITE. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 27 September 2006 % % Author: % % John Burkardt % clear n = 20; m = 5; output_filename = 'itable_05_00020.txt'; fprintf ( 1, '\n' ); fprintf ( 1, 'TEST03\n' ); fprintf ( 1, ' ITABLE_WRITE writes an integer TABLE file.\n' ); for i = 1 : m for j = 1 : n table(i,j) = ( 100 * j + i ); end end fprintf ( 1, '\n' ); fprintf ( 1, ' Spatial dimension M = %d\n', m ); fprintf ( 1, ' Number of points N = %d\n', n ); i4mat_print_some ( m, n, table, 1, 1, 5, 5, ... ' 5x5 portion of the data written to file:' ); header = 1; itable_write ( output_filename, m, n, table, header ); fprintf ( 1, '\n' ); fprintf ( 1, ' Wrote the header and data for %s\n', output_filename ); return end