Is it possible to assign the values of several species or parameters at once in SimBiology 4.3 (R2013a)?
5 次查看(过去 30 天)
显示 更早的评论
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.
采纳的回答
MathWorks Support Team
2013-3-21
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Extend Modeling Environment 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!