App to convert Simbiology models to .sbproj files
Show older comments
Hi, I frequently need to convert Simbiology models to .sbproj files using simple script with 'sbiosaveproject' function. I am inerested to build .exe out of this script using Matlab Compiler. However I am not sure if sbiosaveproject is supported by the Compiler. https://www.mathworks.com/products/compiler/supported/compiler_support.html Is there a way to do it?
Accepted Answer
More Answers (5)
Sietse Braakman
on 17 Nov 2017
0 votes
Hi Ivan,
I am not sure I fully understand your situation. If your SimBiology models are not already an .sbproj, what format are the models in before you save them to .sbproj? With the .exe, is your aim to open a model and save it to .sbproj?
Kind regards,
Sietse
Ivan Borisov
on 17 Nov 2017
0 votes
Sietse Braakman
on 17 Nov 2017
Edited: Sietse Braakman
on 17 Nov 2017
0 votes
Hi Ivan,
Here are my thoughts:
- If your models are "SimBiology.Model"-objects (you can hoover over the model in your workspace to confirm), you can do the following:
- Create an app (if you are on MATLAB 2017b, I would recommend using the App designer, rather than GUIDE). In the app:
- Create a button to load the script (uigetfile),
- once loaded, evaluate the script (eval),
- create a text input box to define the file name you want to use for the project,
- create another button that, when clicked, runs code to save the model (sbiosaveproject with the file name defined in step 4).
- compile the app to give you a .exe
- If your models are MATLAB models (i.e. sets of ODEs in MATLAB, rather than a SimBiology.Model object), you could write a script that parses out your ODEs to create a SimBiology model. For instance, you could generate a species for each state in your model and assign a rate rule to each species that is defined by the right-hand side of your ODE. Once you have created this SimBiology model, you'll have a SimBiology.Model object, which you can proceed with as above.
I hope that helps. Kind regards,
Sietse
Ivan Borisov
on 21 Nov 2017
0 votes
Ivan Borisov
on 23 Nov 2017
0 votes
Communities
More Answers in the SimBiology Community
Categories
Find more on Scan Parameter Ranges in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!