Problems with accessing variables using matfile objects

3 views (last 30 days)
I've encountered a problem with using matfile objects that I've created to access variables in large .mat.
I create a matfile object as usual e.g m=matfile('myfile.mat'). The .mat is a large 3 dimensional array with a single variable named 'var'.
The object m is created. But when I index into the data (for example m.var(1:100,1:300,:)) it returns an 'Index exceeds matrix dimensions' error.
I've checked out the variables with the 'whos' command and the syntax is correct. The matfiles I built and saved as v7.3. Looking in the object m, it creates a variable, but it has no dimensions assigned to it. I tested some code I used successfully on the same .mat files a day or two ago, and it has the same problem.
The only thing I've done in the interim is use some functions from the stats toolbox.
This is probaly something very simple, but (rush) help on this would be much appreciated.
Anthony

Answers (1)

Walter Roberson
Walter Roberson on 6 Oct 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!