.m files conversion from 2013a to 2012a?

1 view (last 30 days)
J H
J H on 3 Dec 2015
Commented: J H on 3 Dec 2015
I have Matlab 2013a and I have to save a .m in the 2012a version. How can I do that? Is there any difference between the .m files. or is it the same in all versions?

Answers (1)

Walter Roberson
Walter Roberson on 3 Dec 2015
Edited: Walter Roberson on 3 Dec 2015
.m files are text files and can be read by any version. There are functions defined in R2013a that were not defined in earlier versions so the code might not necessarily work, but the file will be readable.
The exception to this is that there is a possibility that you have saved your .m file in UTF-8 form; if you try to read a UTF-8 file in an early enough version then it will treat any extended characters as just sequences of bytes. This would affect you most if you have string constants that use characters that are not in ISO-8896-1 .

Community Treasure Hunt

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

Start Hunting!