TinyMAT
a library to write Matlab MAT-files
|
Modules | |
TinyMATWriter-Support for OpenCV Datatypes | |
TinyMATWriter-Support for Qt Datatypes | |
Functions | |
TINYMAT_EXPORT void | TinyMATWriter_close (TinyMATWriterFile *mat) |
close a given MAT file | |
TINYMAT_EXPORT void | TinyMATWriter_endCellArray (TinyMATWriterFile *mat) |
Low-Level-Interface zum Schrieben von Cell-Arrays: beendet das aktuelle Cell-Array. | |
TINYMAT_EXPORT void | TinyMATWriter_endStruct (TinyMATWriterFile *mat) |
end to write a struct-element | |
TINYMAT_EXPORT int | TinyMATWriter_fOK (const TinyMATWriterFile *mat) |
returns TRUE (non-zero) if the given TinyMATWriterFile has been opened successfully and is OK | |
TINYMAT_EXPORT const char * | TinyMATWriter_getVersion () |
returns the version number of TinyMATWriter | |
TINYMAT_EXPORT TinyMATWriterFile * | TinyMATWriter_open (const char *filename, const char *description=NULL, size_t bufSize=1024 *100) |
create a new MAT file | |
TINYMAT_EXPORT void | TinyMATWriter_startCellArray (TinyMATWriterFile *mat, const char *name, const int32_t *sizes, uint32_t ndims) |
Low-Level-Interface for writing Cell-Arrays: starts a generic Cell-Array. | |
TINYMAT_EXPORT void | TinyMATWriter_startCellMatrix2D (TinyMATWriterFile *mat, const char *name, int32_t cols, int32_t rows) |
Low-Level-Interface for writing Cell-Arrays: starts a 2D Cell-Array. | |
TINYMAT_EXPORT void | TinyMATWriter_startCellVectorAsCol (TinyMATWriterFile *mat, const char *name, int32_t nitems) |
Low-Level-Interface for writing Cell-Arrays: starts a 1D Cell-Array (column) | |
TINYMAT_EXPORT void | TinyMATWriter_startCellVectorAsRow (TinyMATWriterFile *mat, const char *name, int32_t nitems) |
Low-Level-Interface for writing Cell-Arrays: starts a 1D Cell-Array (row) | |
TINYMAT_EXPORT void | TinyMATWriter_startStruct (TinyMATWriterFile *mat, const char *name) |
start to write a struct-element | |
template<typename T > | |
void | TinyMATWriter_writeContainerAsColumn (TinyMATWriterFile *mat, const char *name, const T &data_vec) |
write a 1-dimensional vector/list/... of values as a column-vector into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeContainerAsColumn_internalCopy (TinyMATWriterFile *mat, const char *name, const T &data_vec) |
write a 1-dimensional vector/list/... of values as a column-vector into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeContainerAsRow (TinyMATWriterFile *mat, const char *name, const T &data_vec) |
write a 1-dimensional vector/list/... of values as a row-vector into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeContainerAsRow_internalCopy (TinyMATWriterFile *mat, const char *name, const T &data_vec) |
write a 1-dimensional vector/list/... of values as a row-vector into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeDoubleList (TinyMATWriterFile *mat, const char *name, const std::list< double > &data, bool columnVector=false) |
write a 1-dimensional std::list<double> into a MAT-file as a 1D matrix | |
TINYMAT_EXPORT void | TinyMATWriter_writeDoubleVector (TinyMATWriterFile *mat, const char *name, const std::vector< double > &data, bool columnVector=false) |
write a 1-dimensional std::vector<double> into a MAT-file as a 1D matrix | |
TINYMAT_EXPORT void | TinyMATWriter_writeEmptyMatrix (TinyMATWriterFile *mat, const char *name) |
write an empty (double) matrix into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMatrix2D_colmajor (TinyMATWriterFile *mat, const char *name, const T *data_real, int32_t cols, int32_t rows) |
write a 2-dimensional double matrix in column-major order into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMatrix2D_rowmajor (TinyMATWriterFile *mat, const char *name, const T *data_real, int32_t cols, int32_t rows) |
write a 2-dimensional double matrix in row-major order into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMatrix2x2 (TinyMATWriterFile *mat, const char *name, T m11, T m12, T m21, T m22) |
write a 2x2-dimensional double matrix with entries given in row-major order directly as parameters into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMatrix3x3 (TinyMATWriterFile *mat, const char *name, T m11, T m12, T m13, T m21, T m22, T m23, T m31, T m32, T m33) |
write a 3x3-dimensional double matrix with entries given in row-major order directly as parameters into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const bool *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional bool matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const double *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional double matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const float *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional float matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const int16_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional int16_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const int32_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional int32_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const int64_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional int64_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const int8_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional int8_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const uint16_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional uint16_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const uint32_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional uint32_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const uint64_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional uint64_t matrix in column-major form into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeMatrixND_colmajor (TinyMATWriterFile *mat, const char *name, const uint8_t *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional uint8_t matrix in column-major form into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMatrixND_rowmajor (TinyMATWriterFile *mat, const char *name, const T *data_real, const int32_t *sizes, uint32_t ndims) |
write a N-dimensional double matrix into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMultiChannelMatrix2D_rowmajor (TinyMATWriterFile *mat, const char *name, const T *data_real, int32_t cols, int32_t rows, uint32_t c) |
write a N-dimensional matrix with C color channels (e.g. C=3 RGBRGBRGB...) into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeMultiChannelMatrixND_rowmajor (TinyMATWriterFile *mat, const char *name, const T *data_real, const int32_t *sizes, uint32_t ndims, uint32_t c) |
write a N-dimensional matrix with C color channels (e.g. C=3 RGBRGBRGB...) into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeString (TinyMATWriterFile *mat, const char *name, const char *data) |
write a string into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeString (TinyMATWriterFile *mat, const char *name, const char *data, uint32_t slen) |
write a string into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeString (TinyMATWriterFile *mat, const char *name, const std::string &data) |
write a string into a MAT-file | |
TINYMAT_EXPORT void | TinyMATWriter_writeStringList (TinyMATWriterFile *mat, const char *name, const std::list< std::string > &data) |
write a 1-dimensional std::list<std::string> into a MAT-file as a cell array | |
TINYMAT_EXPORT void | TinyMATWriter_writeStringVector (TinyMATWriterFile *mat, const char *name, const std::vector< std::string > &data) |
write a 1-dimensional std::vector<std::string> into a MAT-file as a cell array | |
TINYMAT_EXPORT void | TinyMATWriter_writeStruct (TinyMATWriterFile *mat, const char *name, const std::map< std::string, double > &data) |
write a a std::map<std::string,double> into a MAT-file as a struct | |
template<typename T > | |
void | TinyMATWriter_writeValue (TinyMATWriterFile *mat, const char *name, T data_real) |
write a single (numeric) value (as 1x1 matrix) into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeVectorAsColumn (TinyMATWriterFile *mat, const char *name, const T *data_real, int32_t rows) |
write a 1-dimensional double vector as a column-vector into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeVectorAsColumn (TinyMATWriterFile *mat, const char *name, T d1, T d2) |
write a 1-dimensional double vector as a row-vector into a MAT-file with data directly as parameter direct | |
template<typename T > | |
void | TinyMATWriter_writeVectorAsRow (TinyMATWriterFile *mat, const char *name, const T *data_real, int32_t rows) |
write a 1-dimensional double vector as a row-vector into a MAT-file | |
template<typename T > | |
void | TinyMATWriter_writeVectorAsRow (TinyMATWriterFile *mat, const char *name, T d1, T d2) |
write a 1-dimensional double vector as a row-vector into a MAT-file with data directly as parameter direct | |
Here is Octave/Matlab code to test the output and create a comparable MAT-file:
TINYMAT_EXPORT void TinyMATWriter_close | ( | TinyMATWriterFile * | mat | ) |
close a given MAT file
tiff | TIFF file to close |
This function also releases memory allocated in TinyMATWriter_open() in tiff.
TINYMAT_EXPORT void TinyMATWriter_endCellArray | ( | TinyMATWriterFile * | mat | ) |
Low-Level-Interface zum Schrieben von Cell-Arrays: beendet das aktuelle Cell-Array.
mat | the MAT-file to write into |
name | struc the structure object to finish |
TINYMAT_EXPORT void TinyMATWriter_endStruct | ( | TinyMATWriterFile * | mat | ) |
end to write a struct-element
mat | the MAT-file to write into |
name | struc the structure object to finish |
TINYMAT_EXPORT int TinyMATWriter_fOK | ( | const TinyMATWriterFile * | mat | ) |
returns TRUE
(non-zero) if the given TinyMATWriterFile has been opened successfully and is OK
mat | the MAT-file |
TRUE
if the file is OK and can be written to or FALSE
TINYMAT_EXPORT const char * TinyMATWriter_getVersion | ( | ) |
returns the version number of TinyMATWriter
TINYMAT_EXPORT TinyMATWriterFile * TinyMATWriter_open | ( | const char * | filename, |
const char * | description = NULL , |
||
size_t | bufSize = 1024 *100 |
||
) |
create a new MAT file
filename | name of the new TIFF file |
description | description of the file (max. 115 characters) |
bufSize | size of the IO-Buffer used for the MAT-file ... Choosing a size in the range of the final file size may improve performance! The default-size is 100kB. |
TINYMAT_EXPORT void TinyMATWriter_startCellArray | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
Low-Level-Interface for writing Cell-Arrays: starts a generic Cell-Array.
mat | the MAT-file to write into |
name | variable name for the new array (max. len: 31 characters) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
After a call to this function, simply use any TinyMATWriter-function to write the cell-array entires in column-major order with "name" left blanck. Finally close the array by calling TinyMATWriter_endCellArray(). You can nest severall startCellArray/endCellAray-calls.
|
inline |
Low-Level-Interface for writing Cell-Arrays: starts a 2D Cell-Array.
mat | the MAT-file to write into |
name | variable name for the new array (max. len: 31 characters) |
cols | number of columns in the cell array |
rows | number of rows in the cell array |
After a call to this function, simply use any TinyMATWriter-function to write the cell-array entires in column-major order with "name" left blanck. Finally close the array by calling TinyMATWriter_endCellArray(). You can nest severall startCellArray/endCellAray-calls.
|
inline |
Low-Level-Interface for writing Cell-Arrays: starts a 1D Cell-Array (column)
mat | the MAT-file to write into |
name | variable name for the new array (max. len: 31 characters) |
nitems | number of entries in the vector |
After a call to this function, simply use any TinyMATWriter-function to write the cell-array entries with "name" left blanck. Finally close the array by calling TinyMATWriter_endCellArray(). You can nest severall startCellArray/endCellAray-calls.
|
inline |
Low-Level-Interface for writing Cell-Arrays: starts a 1D Cell-Array (row)
mat | the MAT-file to write into |
name | variable name for the new array (max. len: 31 characters) |
nitems | number of entries in the vector |
After a call to this function, simply use any TinyMATWriter-function to write the cell-array entries with "name" left blanck. Finally close the array by calling TinyMATWriter_endCellArray(). You can nest severall startCellArray/endCellAray-calls.
TINYMAT_EXPORT void TinyMATWriter_startStruct | ( | TinyMATWriterFile * | mat, |
const char * | name | ||
) |
start to write a struct-element
mat | the MAT-file to write into |
name | variable name for the new array (max. len: 31 characters) |
|
inline |
write a 1-dimensional vector/list/... of values as a column-vector into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_vec | the array to write. This container has to implement the function size() and an iterator with tool-functions begin() and end(). Data-Items (T::value_type) has to be integer numbers or floats |
|
inline |
write a 1-dimensional vector/list/... of values as a column-vector into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_vec | the array to write. This container has to implement the function size() and an iterator with tool-functions begin() and end(). Data-Items (T::value_type) has to be integer numbers or floats |
|
inline |
write a 1-dimensional vector/list/... of values as a row-vector into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_vec | the array to write. This container has to implement the function size() and an iterator with tool-functions begin() and end() |
|
inline |
write a 1-dimensional vector/list/... of values as a row-vector into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_vec | the array to write. This container has to implement the function size() and an iterator with tool-functions begin() and end() |
TINYMAT_EXPORT void TinyMATWriter_writeDoubleList | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const std::list< double > & | data, | ||
bool | columnVector = false |
||
) |
write a 1-dimensional std::list<double> into a MAT-file as a 1D matrix
mat | the MAT-file to write into |
name | variable name for the new array |
data | the array to write |
columnVector | if \C true, data is stored as a column vector ... otherwise as a row-vetor |
TINYMAT_EXPORT void TinyMATWriter_writeDoubleVector | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const std::vector< double > & | data, | ||
bool | columnVector = false |
||
) |
write a 1-dimensional std::vector<double> into a MAT-file as a 1D matrix
mat | the MAT-file to write into |
name | variable name for the new array |
data | the array to write |
columnVector | if \C true, data is stored as a column vector ... otherwise as a row-vetor |
TINYMAT_EXPORT void TinyMATWriter_writeEmptyMatrix | ( | TinyMATWriterFile * | mat, |
const char * | name | ||
) |
write an empty (double) matrix into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
|
inline |
write a 2-dimensional double matrix in column-major order into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
cols | number of columns |
rows | number of rows |
|
inline |
write a 2-dimensional double matrix in row-major order into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in row-major order) |
cols | number of columns |
rows | number of rows |
|
inline |
write a 2x2-dimensional double matrix with entries given in row-major order directly as parameters into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
|
inline |
write a 3x3-dimensional double matrix with entries given in row-major order directly as parameters into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const bool * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional bool matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const double * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional double matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const float * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional float matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const int16_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional int16_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const int32_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional int32_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const int64_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional int64_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const int8_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional int8_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const uint16_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional uint16_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const uint32_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional uint32_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const uint64_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional uint64_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
TINYMAT_EXPORT void TinyMATWriter_writeMatrixND_colmajor | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const uint8_t * | data_real, | ||
const int32_t * | sizes, | ||
uint32_t | ndims | ||
) |
write a N-dimensional uint8_t matrix in column-major form into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in column-major order) |
sizes | number of entries in each dimension {rows, cols, matrices, ...} |
ndims | number of dimensions |
|
inline |
write a N-dimensional double matrix into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in row-major order) {M1row1, M1row2, ..., M1rowC, M2row1, M2row2, ... } |
sizes | number of entries in each dimension {cols, rows, matrices, ...} |
ndims | number of dimensions |
|
inline |
write a N-dimensional matrix with C color channels (e.g. C=3 RGBRGBRGB...) into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in row-major order) {M1row1, M1row2, ..., M1rowC, M2row1, M2row2, ... }, where each elements has the channels in order C2C2C3C1C2C3... |
sizes | number of entries in each dimension {cols, rows, matrices, ...} |
ndims | number of dimensions |
c | number of channels |
This function will actually write an ndims+1-dimensional matrix, where the outer-most dimension is the number of channels. The input data is then separated into planes!
|
inline |
write a N-dimensional matrix with C color channels (e.g. C=3 RGBRGBRGB...) into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in row-major order) {M1row1, M1row2, ..., M1rowC, M2row1, M2row2, ... }, where each elements has the channels in order C2C2C3C1C2C3... |
sizes | number of entries in each dimension {cols, rows, matrices, ...} |
ndims | number of dimensions |
c | number of channels |
This function will actually write an ndims+1-dimensional matrix, where the outer-most dimension is the number of channels. The input data is then separated into planes!
TINYMAT_EXPORT void TinyMATWriter_writeString | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const char * | data | ||
) |
write a string into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data | the string to write |
TINYMAT_EXPORT void TinyMATWriter_writeString | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const char * | data, | ||
uint32_t | slen | ||
) |
write a string into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data | the string to write |
slen | length of the string in bytes |
TINYMAT_EXPORT void TinyMATWriter_writeString | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const std::string & | data | ||
) |
write a string into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data | the string to write |
TINYMAT_EXPORT void TinyMATWriter_writeStringList | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const std::list< std::string > & | data | ||
) |
write a 1-dimensional std::list<std::string> into a MAT-file as a cell array
mat | the MAT-file to write into |
name | variable name for the new array |
data | the array to write |
TINYMAT_EXPORT void TinyMATWriter_writeStringVector | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const std::vector< std::string > & | data | ||
) |
write a 1-dimensional std::vector<std::string> into a MAT-file as a cell array
mat | the MAT-file to write into |
name | variable name for the new array |
data | the array to write |
TINYMAT_EXPORT void TinyMATWriter_writeStruct | ( | TinyMATWriterFile * | mat, |
const char * | name, | ||
const std::map< std::string, double > & | data | ||
) |
write a a std::map<std::string,double> into a MAT-file as a struct
mat | the MAT-file to write into |
name | variable name for the new array |
data | the array to write |
columnVector | if \C true, data is stored as a column vector ... otherwise as a row-vetor |
|
inline |
write a single (numeric) value (as 1x1 matrix) into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the value to write |
|
inline |
write a 1-dimensional double vector as a column-vector into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in row-major order) |
cols | number of columns |
rows | number of rows |
|
inline |
write a 1-dimensional double vector as a row-vector into a MAT-file with data directly as parameter direct
mat | the MAT-file to write into |
name | variable name for the new array |
d1 | first entry |
d2 | second entry |
|
inline |
write a 1-dimensional double vector as a row-vector into a MAT-file
mat | the MAT-file to write into |
name | variable name for the new array |
data_real | the array to write (in row-major order) |
cols | number of columns |
rows | number of rows |
|
inline |
write a 1-dimensional double vector as a row-vector into a MAT-file with data directly as parameter direct
mat | the MAT-file to write into |
name | variable name for the new array |
d1 | first entry |
d2 | second entry |