필터 지우기
필터 지우기

Can I open a file with different versions of Matlab?

조회 수: 173 (최근 30일)
Vera Sanjuán
Vera Sanjuán 2017년 1월 17일
댓글: Walter Roberson 2017년 1월 22일
Hello there, I have this situation: the version of matlab that is used in my university is 2012B, but I recently got the license for 2016B (I think) so I need to know if I can work with both versions over one file, since I will have to use matlab at both locations (house and university) for my assignments in class and all that stuff, Thank you !

채택된 답변

Richard Zappulla
Richard Zappulla 2017년 1월 18일
In short, Yes, but to varying levels of difficulty.
M-Files are version agnostic, though some commands may be deprecated in the newer releases.
In order to use Simulink files, you will need to be mindful of which version you are using. You can always open an older file in a newer release (i.e. R2016b will open a R2012b Simulink model), but not the other way around (i.e. R2012b will not open a R2016b Simulink model). To be backwards compatible, you will need to make sure you "export" any work done in R2016b to R2012b by going to File >> Export As >> Previous Version.
  댓글 수: 2
Vera Sanjuán
Vera Sanjuán 2017년 1월 21일
Thank you very much!
Walter Roberson
Walter Roberson 2017년 1월 22일
"M-Files are version agnostic"
That is not actually correct. There have been a couple of changes to how objects are represented that have not been backwards compatible. In particular there was a change in roughly the R2007a time frame in object representation that would not allow any portion of the resulting .mat to be loaded in previous versions.
If I recall correctly that was considered a bug; later versions were adjusted so that incompatible items are loaded as byte arrays, so if you do save a file in R2016b and try to load it in R2012a then some parts of it might get returned as bytes but it should be able to load the other parts.
On the other hand, R2012a was before HG2, and .fig files created in R2014b or later might not be usable in R2014a or before. Mathworks does take care to write data into .fig files that is intended to usable on older versions, but I have had at least one case were it failed to load properly in older versions. You should expect potential difficulty in saving graphics objects in R2014b or later and loading them in R2014a or earlier.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by