32 const mwSize* dims = mxGetDimensions(pr);
33 int row =
static_cast<int>(dims[0]);
34 int column =
static_cast<int>(dims[1]);
36 double * data = mxGetPr(pr);
41 for (
int i = 0; i < column; i += 1 )
47 for (
int i = 0; i < row; i += 1 )
59 utlException (!vec || (vec && vec->size()==0),
"the vector is null");
61 int row = vec->size();
65 double * data = mxGetPr(pr);
66 for (
int i = 0; i < row; i += 1 )
#define utlException(cond, expout)
void GetMXArrayFromSTDVector(const std::vector< T > *vec, mxArray *&pr)
mxArray * CreateMatrix< double >(int m, int n)
Create a m x n double matrix.
Contains miscellaneous functions for mex files. utl functions for mex code. Some codes are from spams...
void GetSTDVectorFromMXArray(const mxArray *pr, std::vector< T > *vec)