Error using load when trying to open large structure .MAT file

9 ビュー (過去 30 日間)
Nicholas Kavouris
Nicholas Kavouris 2023 年 8 月 1 日
回答済み: Tejas 2024 年 9 月 26 日
I am trying to reload a struct variable i am using to store data.
When running the load command it simply says:
Cannot read file
Why is this error happening?
I have tried restarting MATLAB and the error persists

回答 (1 件)

Tejas
Tejas 2024 年 9 月 26 日
Hello Nicholas,
This issue often arises when the .MAT file is corrupted. Here are a few suggestions to resolve it:
  • Create a new .MAT file from the same data. This will remove any issues in the .MAT file, making it accessible in MATLAB.
  • If the problem continues, try saving and loading the .MAT file with the version property set to 7.3, as shown below:
save('filename.mat','-v7.3');
load('filename.mat','-v7.3');
For more information about the version property of .MAT file, refer to this documentation: https://in.mathworks.com/help/releases/R2021b/matlab/ref/save.html#:~:text=version%20%E2%80%94%20MAT%2Dfile%20version .

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT Files についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by