From: James Tursa on 3 Jun 2010 13:19 Giff <giffnews(a)gmail.com> wrote in message <hu8gag$e3u$1(a)speranza.aioe.org>... > Dear all, > > I am struggling a bit with the functions provided by Matlab to import > data stored as .mat files into c++ structures. I find the documentation > not too clear. > > In particular, in the .mat file, I have a nxm cell array, where each > cell contains float arrays of dimension axbxc. > > How would it be the easiest way to extract the single nxmxc matrices of > size axb? > > Thanks a lot for any hint! matOpen to open the file matGetVariable to get the cell array variable mxGetCell to get the pointer to the cell contents mxGetPr to get the pointer to the actual data Note that MATLAB stores the data in column order, so if you are planning on indexing into it in your C++ code you need to account for that. James Tursa
|
Pages: 1 Prev: Line plot covered by surface plot Next: MATLAB Mex Error |