So I have a matlab file that is a 3d matrix. I am using C++ to read in the file, specifically with matio.h but I am having some trouble/confusion with reading the actual data. I know how to find out how many dimensions, rank, and name of the data, but to actually read in the data is the hard part. Currently I have
mat_t *mat = Mat_Open(result, MAT_ACC_RDONLY);
matvar_t *matvar;
matvar = Mat_VarReadNExtInfo(mat);
int r = matvar->dims[0];
I guess I am confused as to how to use the matvar->data pointer.