Bigger than 2GB Data Storage

1,007 次查看(过去 30 天)
Hello,
I`m a 2016B user. This version complains about my synthetic data storage and says that `For variables larger than 2GB use MAT-file version 7.3 or later.`. I cannot obtain higher version. Any idea on how to store big data?
Thanks in advance
  2 个评论
Adam
Adam 2018-2-7
You would probably be better splitting your data into chunks if that is possible. Saving large files to v7.3 can be very bad in terms of performance.
Jan
Jan 2018-2-7
The message is clear already: All you have to do is to append the -v7.3 flag to your save command (see Kai's answer) or to set this as default in the preferences.

请先登录,再进行评论。

采纳的回答

Kai Domhardt
Kai Domhardt 2018-2-7
Take from the reference and tested with Matlab R2016b:
save('myFile.mat', 'Variablename', '-v7.3')
will save your variable ( > 2GB ), provided you are running on an 64-bit system
  13 个评论
Julia
Julia 2024-10-29,23:47
I am having the same issue and am running MATLAB R2024a on a 64 bit PC. The .mat file I have is output from Dymola (not originally made in MATLAB) and contains five small variables and one large variable (2-3GB). It is not v7.3, but I can't see what version it is. The solution above seems like it saves the mat file to the 7.3 version if it has been successfully loaded into MATLAB, but I can't load my large variable into MATLAB in the first place, even with matfile() which only seems to accept v7.3. Thus when I try to save it, it erases the large variable completely. Do you have any insight into how to load the data into MATLAB considering this?

请先登录,再进行评论。

更多回答(1 个)

Steven Lord
Steven Lord 2018-2-7
Open the documentation for the save function using doc save. In order to save your data to a MAT-file with version 7.3 or later, specify the '-v7.3' flag as the version input argument. The "Save Variables to Version 7.3 MAT-File" example on that page shows the exact syntax.

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by