Is it possible to normalize the output using GUI?

1 visualizzazione (ultimi 30 giorni)
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 Commento
Rik
Rik il 28 Mag 2020
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.

Accedi per commentare.

Risposta accettata

Jeremy Huard
Jeremy Huard il 28 Mag 2020
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

Più risposte (0)

Community

Più risposte nel  SimBiology Community

Categorie

Scopri di più su Extend Modeling Environment in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by