How to read Unreadable Files!

6 ビュー (過去 30 日間)
Omar
Omar 2017 年 12 月 19 日
コメント済み: Omar 2017 年 12 月 26 日
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
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
Omar 2017 年 12 月 20 日
No actually I use Matlab 2017a.

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2017 年 12 月 20 日
編集済み: Jan 2017 年 12 月 20 日
I see 2 options:
  1. This is not the file you try to load. Maybe you are working in a different folder than you expect.
  2. 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?
What do you see if you run the code from Walter's code?
  4 件のコメント
Omar
Omar 2017 年 12 月 26 日
these files are outputs of Simulink model using "TO File" block.
Omar
Omar 2017 年 12 月 26 日
I should also point out that I ran these codes on the supercomputer in my school. when I use my own pc no problem at all. knowing that the supercomputer unit also use MatlabR2017a

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by