function itable_write ( output_filename, m, n, table ) %% ITABLE_WRITE writes information to an integer table file. % % Modified: % % 22 October 2004 % % Author: % % John Burkardt % % Parameters: % % Input, character ( len = * ) OUTPUT_FILENAME, the output filename. % % Input, integer M, the spatial dimension. % % Input, integer N, the number of points. % % Input, integer TABLE(M,N), the points. % output_unit = fopen ( output_filename, 'wt' ); if ( output_unit < 0 ) fprintf ( 1, '\n' ); fprintf ( 1, 'ITABLE_WRITE - Error!\n' ); fprintf ( 1, ' Could not open the output file.\n' ); error ( 'ITABLE_WRITE - Error!' ); return; end itable_header_write ( output_filename, output_unit, m, n ); itable_data_write ( output_unit, m, n, table ); fclose ( output_unit ); return end