MATLAB Answers

Loading simbiology models created in MATLAB 2019b in previous version of MATLAB

6 views (last 30 days)
1) Is there a way to load models created in MATLAB 2019b in previous version of MATLAB? I get the warning: Variable 'model_x' originally saved as a SimBiology.Model cannot be instantiated as an object and will be read in as a uint32.
2) Is there a way to save the model created in MATLAB 2019b as previous version, for example as a 2018b simbiology model?

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 17 Jan 2020
In general, we cannot guarantee this kind of compatibility (which is called "forward compatibility"). In practice, SimBiology models have been largely compatible across releases. Hovwever, R2019b introduced a major change that means you cannot load models in earlier releases.
So, regarding question 1: There is no way to directly load a R2019b SimBiology model in an earlier release. You must save/export that model in some special way if you want to use it in an earlier release.
Regarding question 2: The simplest option for sharing a R2019b model in an earlier release is to export the model to SBML. However, not all features of SimBiology models are compatible with SBML. If you want to preserve more of the model across MATLAB versions, the best way is to transfer the model as "code". By that I mean you can write a script that constructs the model using the same commands you use to construct it in R2019b. If you need to do this, consider contacting MathWorks Technical Support. We have some automated tools that could help with the process.
  4 Comments
Arthur Goldsipe
Arthur Goldsipe on 2 Apr 2020
Great to hear. And good luck finishing your thesis.
You should generally be able to open old projects in new versions. If the project with data and simulations wouldn't open in R2020a, that sounds like a bug. If you can share the project with me when you get a chance, we can investigate and try to fix any bugs we find. (But I'm glad you were able to work around it.)

Sign in to comment.

More Answers (0)

Communities

More Answers in the  SimBiology Community

Community Treasure Hunt

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

Start Hunting!