Converting *.m files from 2004 version to a newer version

2 visualizaciones (últimos 30 días)
Hello everyone I'm trying to run a code which use a *.m file created from a program (Not matlab) but the problem is that is version is 2004. I can not create the file in another format so I want to ask if someone knows how to convert a file from the 2004 version to an earlier version?.
PD: When I was using Matlab for Windows it could open it even with the version been 2004 and my Matlab been 2012. But now that I use Ubuntu, my matlab crashes leaving me the next error message: " Error using load Number of columns on line 3 of ASCII file /home/camo/Documentos/Universidades/Unal/Thesis/Tests/data_1.MAT must be the same as previous lines. "
Thank you very much for your help
  1 comentario
Walter Roberson
Walter Roberson el 16 de Sept. de 2012
Is it a .m file or a .mat file? Is the file ascii or binary? The message indicates that load() thinks it is not a binary .mat file.

Iniciar sesión para comentar.

Respuesta aceptada

Titus Edelhofer
Titus Edelhofer el 16 de Sept. de 2012
Hi,
the error message indicates, that MATLAB assumes the file to be ascii (i.e., tries to load as ascii file). But the ".MAT" looks as if it is a binary .mat file. So now comes a wild guess: MATLAB assumes the .MAT to be ascii, because it's not the .mat it should be. Try to rename as .mat and try to load it again.
If this doesn't help, you might open the file with an editor and follow Walter's comment and give us the info ...
Titus
  1 comentario
Walter Roberson
Walter Roberson el 16 de Sept. de 2012
Ah, case sensitivity perhaps? If so then try using the -mat option when loading.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by