Command "matlab.io.saveVariablesToScript" max memory/elements
12 views (last 30 days)
Hi all, I am using the matlab command matlab.io.saveVariablesToScript In order to save my output in .m file instead of .mat (in order to save space memory in my pc).
But in some case the output is create as a .mat file plus a script that run the .mat file because :
"too many elements at str.Output.error_flag.signals.values"
But I am not able to find the thresholds over that is no longer possible save as .m file
Which is this thesholds ? What it depend on ? The dimension of data, the number of elements, both of them ?
Many thanks for your time and consideration Kind regards
Thomas McKay-Smith on 15 Dec 2022
By trial and error I have found variables are saved to a '.mat' file instead of a script when the the number of elements is >1000. For a structure this only needs to be the case for one field and the whole structure will be saved to the '.mat' file.