Is it possible to normalize the output using GUI?

조회 수: 1 (최근 30일)
Hassan Hijazi
Hassan Hijazi 2020년 5월 28일
댓글: Hassan Hijazi 2020년 5월 28일
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