How to output concentrations if species dimension is 'substance'.
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Arthur Goldsipe
2016-11-16
编辑:Arthur Goldsipe
2016-11-16
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
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scan Parameter Ranges 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!