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

5 vues (au cours des 30 derniers jours)
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.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 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.

Plus de réponses (0)

Catégories

En savoir plus sur Extend Modeling Environment dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by