필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Colin Phipps
Colin Phipps 2016년 11월 15일
편집: Arthur Goldsipe 2016년 11월 16일
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?

채택된 답변

Arthur Goldsipe
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개)

카테고리

Help CenterFile Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by