App designer: How to determine answer using value from dropdown List
Mostrar comentarios más antiguos
I've been trying to programm an app that estimates energy consumption in a household.
For a given appliances the inputs are:
- Number of selected appliances: dropdown list you can choose from. (variable "q1" in code)
- Energy consumption: dropdown list that lists usual engergy consumtion for the appliances (variable "ee1" in code), but also an edit field if you know the exact value (variable "e1" in code).
- Number of hours the appliance is used in a day: edit field (variable "n1" in code).
I've create the callbacks for the button "estimate" as such:

Explanation on Why i used The "if...else...end" : when the user inputs an exact value of the energy consumption of the appliance the answer will be calculated using that value. but if the edit field =0 than the value from the dropdown list is used.
These are the issues i am getting:
-When i put values after i run the program, the value that is calculates seems random and does not look like it was calculated using the values i've inserted, The answer is totally wrong.
-When i select a value for the energy usage from the dropdownlist this is the message that appears:

Please note this the first time i am using this program, my level is lower than that of a beginner. I would appreciate if the your answers were as basic as possible.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Computational Geometry en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!