Is it possible to assign the values of several species or parameters at once in SimBiology 4.3 (R2013a)?
1 view (last 30 days)
Show older comments
I am using the SimBiology GUI and would like to assign the values I have stored in a vector to the species/parameters of my model.
Accepted Answer
MathWorks Support Team
on 21 Mar 2013
You can assign the initial values of all species to the values of a vector as follows:
1. In the SimBiology GUI under Models, right click on your model and select "Export model to Workspace". Unless you already have got a variable called "m1" in the workspace you can leave the variable name as "m1".
2. Assuming you have a column vector "a" with all initial values, convert this vector into a cell array using
points=num2cell(a);
3. Set the Initial amounts of the species to the values of points using
set(m1.Species,{'InitialAmount'},points)
Please note that the order of initial concentrations in the vector needs to be the same as in m1.Species.
The same method can be used to set the values of several parameters at once.
0 Comments
More Answers (0)
See Also
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!