MATLAB Answers

Wouter

.mat file corrupt?

Asked by Wouter
on 22 Apr 2013

Hello,

I tried to open this .mat file: https://dl.dropboxusercontent.com/u/20782274/MOTNL.MAT

But I get the following error:

Error using load
Unknown text on line number 1 of ASCII file
<some path>/MOTNL.MAT
"MATLAB".

I opened this .mat file in notepad and I saw it was created in Matlab 5.0 in 1999. So I believe this is a conversion error? So if this is the case could anyone maybe upconvert it? So I can open it with Matlab 2012a?

  2 Comments

Tobias
on 22 Apr 2013
>> load('MOTNL.MAT')
Warning: Updating objects saved with previous MATLAB version...
Resave your MAT files to improve loading speed. 
> In warning at 26
  In updatewarn at 11
  In ss.loadobj at 13

Do you want the .mat file I generated? There are a LOT of different variables saved in the workspace

Wouter
on 22 Apr 2013

If you are willing to do that, yes I would like that.

Tags

Products

No products are associated with this question.

2 Answers

Answer by Walter Roberson
on 22 Apr 2013
 Accepted answer

Try

 load('MOTNL.MAT', '-mat')

Remember, Linux is case-sensitive, so possibly the .MAT is throwing it off.

  1 Comment

Wouter
on 22 Apr 2013

This worked! Thanks!


Answer by per isakson
on 22 Apr 2013
Edited by per isakson
on 22 Apr 2013

It works here (R2012a,64bit,Windows7)

    >> load('C:\Users\poi\Downloads\MOTNL.MAT')
    Warning: Updating objects saved with previous MATLAB version...
    Resave your MAT files to improve loading speed. 
    > In warning at 26
      In updatewarn at 11
      In ss.loadobj at 13 

The data looks ok.

Delete and download the file a second time.

  1 Comment

Wouter
on 22 Apr 2013

I tried that. Maybe it is because I am using Linux, 32bit. Maybe you could export it and upload it?


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today