NAME

fp_write_matrix_size_header - Writes matrix size header to a matrix file.

SYNOPSIS

#include "l/l_int_mat_io.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int fp_write_matrix_size_header
(
	FILE *fp,
	int num_rows,
	int num_cols
);

DESCRIPTION

This routine writes the matrix size information contined in num_rows and num_cols to the file indicated by the file pointer "fp". The matrix size is taken from the "num_rows" and "num_cols" fields of the input Int_matrix. The matrix size header has the format:
    #! rows=<num-matrix-rows> cols=<num-matrix-cols>
where <num-matrix-rows> and <num-matrix-cols> are positive integers. (The "#" is actually the comment char (user settable) and the "!" is actually the header char, also user settable). "num_rows" and "num_cols" fields are tested to ensure they are positive integers. If one or both of the values are negative, ERROR is returned and the error message set.

RETURNS

Either NO_ERROR on success, or ERROR, with an appropriate error message being set.

NOTE

This function is not normally required unless more than one integer matrix is stored in the file, or if the calling program can make no assumptions about the matrix size.

RELATED

read_matrix_size_header

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Lindsay Martin

DOCUMENTER

Lindsay Martin

SEE ALSO

read_int_matrix_from_config_file , read_int_matrix , fp_read_int_matrix , fp_read_raw_int_matrix , fp_read_int_matrix_from_matlab_file , fp_read_int_matrix_with_header , fp_read_formatted_int_matrix , read_int_matrix_by_rows , fp_read_int_matrix_by_rows , read_int_matrix_by_cols , fp_read_int_matrix_by_cols , fp_ow_read_formatted_int_matrix , fp_ow_read_int_matrix_by_rows , fp_ow_read_int_matrix_by_cols , fp_read_matrix_size_header , fp_write_int_matrix_with_title , write_int_matrix , fp_write_int_matrix , write_raw_int_matrix , fp_write_raw_int_matrix , write_int_matrix_rows , fp_write_int_matrix_rows , write_int_matrix_cols , fp_write_int_matrix_cols , write_int_matrix_with_header , fp_write_int_matrix_with_header , write_int_matrix_to_matlab_file , fp_write_int_matrix_to_matlab_file