Is it possible to normalize the output using GUI?

1 次查看(过去 30 天)
Let us say you have x that yeilds y. In the simulation you want to visualize the fraction of conversion: y/x+y i.e the converted x (y herein) over the non-converted x + y.
If you write an initial assignment with this rule to y you will get an error which is reasonably expected. Alternatively, adding new species will add another reaction which doesn't make sense. Using the graphical interface, how can this be resolved? Or should we use the line command instead?
  1 个评论
Rik
Rik 2020-5-28
Have a read here and here. It will greatly improve your chances of getting an answer.
A GUI only changes the way a user interacts with your functions, not the functions themselves. You need to make sure your functions work in scripts or the command line first, then you can create a GUI. For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.

请先登录,再进行评论。

采纳的回答

Jeremy Huard
Jeremy Huard 2020-5-28
Hi Hassan,
in the SimBiology Model Analyzer App you add a step to your program to define and calculate an observable.
This new observable could be defined like this:
fraction = y./x+y
with unit = dimensionless.
It is important to use ./ instead of / because this new observable will be calculated after the simulation using the resulting time-dependent vectors x and y.
Alternatively, you could also define a repeated assignment inside your model with the same equation as above. In this case, you will have to define fraction in your model as a non-constant parameter. fraction is then calculated at each simulation step like any other non-constant model quantity.
Best regards,
Jérémy

更多回答(0 个)

社区

更多回答在  SimBiology Community

类别

Help CenterFile Exchange 中查找有关 Extend Modeling Environment 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by