libidx
|
A class to directly import Matlab variables from Matlab .mat files into idx tensors. More...
#include <matlab.h>
Public Member Functions | |
matlab (const char *filename) | |
virtual | ~matlab () |
Close file handle. | |
template<typename T > | |
idx< T > | load_matrix (const char *name) |
Loads data of element with name 'name' and returns a matrix of type T. | |
template<typename Tmatlab , typename T > | |
void | read_cast_matrix (mxArray *var, idx< T > &m) |
Load and cast data from matlab 'var' with type 'Tmatlab' into 'm' with type 'T'. | |
Protected Attributes | |
const char * | filename |
Loaded filename. | |
MATFile * | fp |
File pointer. | |
int | nvar |
Number of objects in matlab file. |
A class to directly import Matlab variables from Matlab .mat files into idx tensors.
ebl::matlab::matlab | ( | const char * | filename | ) |
Constructs a matlab object by loading all headers but does not actually load the data.
filename | name of the .mat (matlab format) file to be read. |