Is it possible to normalize the output using GUI?

1 visualización (últimos 30 días)
Hassan Hijazi
Hassan Hijazi el 28 de Mayo de 2020
Comentada: Hassan Hijazi el 28 de Mayo de 2020
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 comentario
Rik
Rik el 28 de Mayo de 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.

Iniciar sesión para comentar.

Respuesta aceptada

Jeremy Huard
Jeremy Huard el 28 de Mayo de 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

Más respuestas (0)

Comunidades de usuarios

Más respuestas en  SimBiology Community

Categorías

Más información sobre Extend Modeling Environment en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by