Recover a .mat file
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I saved yesterday my workspace in .mat file. Tried to open the file today and got the following: ??? Error using ==> load Number of columns on line 1 of ASCII file...must be the same as previous lines.
Error in ==> importdata at 195 out = load('-ascii',FileName);
Error in ==> uiimport>runImportdata at 432 [datastruct, OTextDelimiter, OHeaderLines] = ...
Error in ==> uiimport>gatherFilePreviewData at 375 [datastruct, textDelimiter, headerLines]= runImportdata(fileAbsolutePath, type);
Error in ==> uiimport at 205 [ctorPreviewText, ctorHeaderLines, ctorDelim] = ...
What can I do to recover the file?
回答 (6 件)
Andreas Goser
2011 年 4 月 12 日
This is a confusing error message. I would expect this message when using an ASCII file, not a binary MAT file. In order to help you, the following information can be helpful:
- MathWorks release and operating system
- Exact command you try to load the file
- Exact command you used to write the file (copy from yesterday's history
- Can you open the file in an editor? What are the first 2 lines? By that you find whether this is a type of MAT file or ASCII
Walter Roberson
2011 年 4 月 12 日
Why is the traceback showing that you used uiimport() when you indicate that you were trying to load a saved workspace?
0 件のコメント
Hatem
2011 年 10 月 19 日
Hi all,
I just got the same error, but the .mat file is large ( > 100Mbytes ). Sometimes after repeated trials is loads normally, but then gives this error once more later.
Any solutions anyone?
Cheers.
0 件のコメント
Bijan Nouri
2017 年 6 月 21 日
I know its late but I just had the same issue. In my case i'm writing permanently a matrix which adds every 30 s a new row (for the last 6 weeks). I'm not sure what went wrong during the writing process but since yesterday the writing process fails and i get the following error:
Number of columns on line 2 of ASCII file myFile.mat must be the same as previous lines.
Well i could open my file via:
X = matfile('yourFileName');
In the end I lost the last 600 rows of my file, but i could store all previous data in a new mat file.
0 件のコメント
Vanusha Vicknesvaran
2020 年 11 月 28 日
Write a MATLAB code to estimate and plot the joint PMF from two .mat files?
Does anyone know how to do this?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!