Can I open a file with different versions of Matlab?
155 次查看(过去 30 天)
显示 更早的评论
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 !
0 个评论
采纳的回答
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 个评论
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 Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!