Is it possible to assign the values of several species or parameters at once in SimBiology 4.3 (R2013a)?

5 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
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 个)

类别

Help CenterFile Exchange 中查找有关 Extend Modeling Environment 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by