src/GamIO/MatLabFile.cc
/* These functions will access a MATLAB file and read one of its array data
   elements into a GAMMA array. Since MATLAB arrays are not distinguished
   from vectors, the read always produces matrices as well.  Users must do
   a type cast to produce the data in a row or column vector.                */
These functions will access a MATLAB file and read one of its array data
elements into a GAMMA array. Since MATLAB arrays are not distinguished
from vectors, the read always produces matrices as well.  Users must do
a type cast to produce the data in a row or column vector.
These functions will access a MATLAB file and read one of its array data elements into a GAMMA array . Since MATLAB arrays are not distinguished from vectors the read always produces matrices as well . Users must do a type cast to produce the data in a row or column vector .
matrix MATLAB(const std::string& filename, const std::string& name, int warn) 
  {
  MatLabFile MLF(filename, std::ios::binary|std::ios::in);
  matrix mx = MLF.GetMatrix(name, warn);	
  if(!mx.rows() && warn)
    {
    MLF.MLFerror(1, filename, 1);		
    if(warn > 1) MLF.MLFfatality(10,name);	
    }
  return mx;
  }
matrix MATLAB ( const std :: string & filename , const std :: string & name , int warn ) { MatLabFile MLF ( filename , std :: ios :: binary | std :: ios :: in ) ; matrix mx = MLF . GetMatrix ( name , warn ) ; if ( ! mx . rows ( ) && warn ) { MLF . MLFerror ( 1 , filename , 1 ) ; if ( warn > 1 ) MLF . MLFfatality ( 10 , name ) ; } return mx ; }
These functions will access a MATLAB file and read one of its array data
elements into a GAMMA array.
These functions will access a MATLAB file and read one of its array data elements into a GAMMA array .
// Open a MATLAB File // Return matrix name // Problems with filename // Can't read requested array