src/GamIO/ML4Tag.cc
/* These are the functions which will output a tag in MATLAB ".mat" binary
   format, version 4.  Note that in a valid MATLAB MAT file, this tag will
   be associated with a "Data Element" or a "Sub-Element".
 
                Input           ML4H    : MAT version 4 tag (this)
                                fp      : Output file stream
                Output          void    : Output file stream is modified
                                          by having the ML4H written to it
                Note                    : No care is taken to insure the
                                          tag is written tothe top of the
                                          file (as it should be in MATLAB)   */
These are the functions which will output a tag in MATLAB ".mat" binary
format, version 4.  Note that in a valid MATLAB MAT file, this tag will
be associated with a "Data Element" or a "Sub-Element".

Input           ML4H    : MAT version 4 tag (this)
fp      : Output file stream
Output          void    : Output file stream is modified
by having the ML4H written to it
Note                    : No care is taken to insure the
tag is written tothe top of the
file (as it should be in MATLAB)
These are the functions which will output a tag in MATLAB " . mat " binary format version 4 . Note that in a valid MATLAB MAT file this tag will be associated with a " Data Element " or a " Sub - Element " . Input ML4H : MAT version 4 tag ( this ) fp : Output file stream Output void : Output file stream is modified by having the ML4H written to it Note : No care is taken to insure the tag is written tothe top of the file ( as it should be in MATLAB )
int MatLab4Tag::write(std::fstream& fp) const                                       
  {
  fp.write((char*)&type,   sizeof(int32_t));	
  fp.write((char*)&mrows,  sizeof(int32_t));	
  fp.write((char*)&ncols,  sizeof(int32_t));	
  fp.write((char*)&cmplxf, sizeof(int32_t));	
  fp.write((char*)&nlen,   sizeof(int32_t));	
  return 1;
  }
int MatLab4Tag :: write ( std :: fstream & fp ) const { fp . write ( ( char * ) & type , sizeof ( int32_t ) ) ; fp . write ( ( char * ) & mrows , sizeof ( int32_t ) ) ; fp . write ( ( char * ) & ncols , sizeof ( int32_t ) ) ; fp . write ( ( char * ) & cmplxf , sizeof ( int32_t ) ) ; fp . write ( ( char * ) & nlen , sizeof ( int32_t ) ) ; return 1 ; }
These are the functions which will output a tag in MATLAB ".mat" binary
format, version 4.
These are the functions which will output a tag in MATLAB " . mat " binary format version 4 .
// Write in computer type // Write in array rows // Write in array columns // Write in real/complex flag // Write in name length