Unable to read MAT-File . . . file may be corrupt
108 views (last 30 days)
Show older comments
Hello Mathworks -
I developed a function that reads a structure array from an existing *.mat file. When running the code from the Matlab command prompt (i.e., interpretive) using R2012b on a 64-bit Linux cluster, everything works fine. However, when I compile the same function via "mcc", the function initializes fine, but ultimately gives me the following error when reading the existing *.mat file:
Unable to read MAT-file. File may be corrupt.
The file is not corrupt as it can be read properly from the Matlab command prompt without difficulty. The file is small (~2 MB), but is highly sparse. Poking around on your website suggests the error message is likely due to too large of a file size or spaces within the variable name(s), but neither of these are the case.
What can I do to make the Matlab compiler behave as well as the Matlab command line? Any and all help is greatly appreciated. Thank you for your time and consideration.
- Bart
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!