How to read Unreadable Files!
古いコメントを表示
Hi Guys! I have trouble plotting .mat format files. The error message is "Unable to read MAT-file. Not a binary MAT-file. Try load -ASCII to read as text". Is there anyone can help why these files are unreadable and How they can be fixed? knowing, the files are Simulink outputs!
Thanks in advance,
6 件のコメント
Walter Roberson
2017 年 12 月 19 日
Can you attach one of the files?
Omar
2017 年 12 月 20 日
Walter Roberson
2017 年 12 月 20 日
Okay, then for now please show
fid = fopen('NameOfMatFile.mat', 'r');
first256 = fread(fid, [1 256], '*uint8');
close(fid);
first256
char(first256)
Omar
2017 年 12 月 20 日
Walter Roberson
2017 年 12 月 20 日
That looks like it might be a real .mat file.
Is it possible that you are trying to load the file with a version of MATLAB older than R2006b ?
You can post the file on Google Drive or Dropbox for people to examine
Omar
2017 年 12 月 20 日
回答 (1 件)
I see 2 options:
- This is not the file you try to load. Maybe you are working in a different folder than you expect.
- The file is really damaged. Then it will be impossible to open it. This is the definition of "unreadable". Do you have a backup of the file or can you re-create it?
4 件のコメント
Omar
2017 年 12 月 26 日
Jan
2017 年 12 月 26 日
The file is damaged. load cannot read it. The header claims, that it has a HDF5 format:
MATLAB 7.3 MAT-file, Platform: GLNXA64,
Created on: Fri Dec 22 20:40:57 2017 HDF5 schema 1.00 .
But hdf5info cannot read it also. It seems like the file is damaged. How do you create these files?
Omar
2017 年 12 月 26 日
Omar
2017 年 12 月 26 日
カテゴリ
ヘルプ センター および File Exchange で Large Files and Big Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!