Effacer les filtres
Effacer les filtres

How to output concentrations if species dimension is 'substance'.

1 vue (au cours des 30 derniers jours)
Colin Phipps
Colin Phipps le 15 Nov 2016
I have a huge model where 'DefaultSpeciesDimension' is set to 'substance'. I coded in terms of substance amounts, because it was easier that way. If I want to output concentrations when I simulate the model, will I have to define concentrations (with rules), or is there some easy way to switch plots to concentrations using the user interface?

Réponse acceptée

Arthur Goldsipe
Arthur Goldsipe le 16 Nov 2016
Modifié(e) : Arthur Goldsipe le 16 Nov 2016
Hi Colin,
Today (as of R2016b), you must decide to represent a species either in amount or in concentration. There is no direct way to refer to both the amount and concentration of a species in the same model.
As you've already discovered, one workaround would be to add a repeated assignment rule to calculate the concentration.
I can think of another possible workaround within the SimBiology Desktop. If you want the concentrations to appear on the "Live Plots" within a simulation task, then you can add a calculated value to a plot. You can read more about in the documentation (search for Define Math). To summarize that, you'd need to add a plot entry for the species amount, another for the compartment volume, and then add math along the lines of SpeciesAmount./CompartmentVolume, where SpeciesAmount is the legend name for the species amount and CompartmentVolume is the legend name for the compartment.
Feel free to contact me directly if you have additional questions, since I don't get notified of any additional comments you post here.
-Arthur

Plus de réponses (0)

Catégories

En savoir plus sur Scan Parameter Ranges 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