What means the resulting matError code 3 of matPutVariable()?

3 views (last 30 days)
I am creating a huge mxArray which I want to write in a mat File. But I get an errorcode 3 while processing this method.
matPutVariable(mat_file, field_name, value);
Ive searched the MatLab help but couldnt findt more than
#define OVERFLOW 3
and
LIBMAT_API_OFFERS_ERROR_ENUMS
Does anyone know where I can find informations about the retuning error codes?
Edit: I am working with Visual Studio 2013; C++; MatLab R2013b x64
  1 Comment
Primoz Ocepek
Primoz Ocepek on 24 Jul 2017
I know this is old topic, but I'm having the same problem in Visual Studio 2016 and Matlab R2016a x64 bit version. Every help is appreciated. Thx in advance.

Sign in to comment.

Answers (1)

Tim Sweet
Tim Sweet on 21 Sep 2018
Edited: Tim Sweet on 21 Sep 2018
This error is returned when the variable to be added to the file is larger than 2^31 bytes. You can use use the output mode "w7.3" to write larger variables, but note that there are tradeoffs.
For example:
matOpen(filename, "w7.3");

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!