How to commit statement only under certain conditions?
Afficher commentaires plus anciens
Hello, I'm simulating water heating and I need to create certain condition and I dont know how to create it properly.
Required temperature of water is 55 °C. Minimal temperature is 50 °C. Maximum temperature is 70 °C.
I have 2 types of heating - electrical heating which heats water to required temperature 55 °C and photovoltaic heating which can heat water to maximum temperature.
I need to create condition which turn on electrical heating only if temperature drops below 50 °C and stops after reaching 55 °C. If the temperature is between 50 and 55 without dropping under 50 °C only photovoltaic heating is possible and electrical heating is off.
Temperature is checked every minute for whole year. Conditions will be placed in for cycle. I dont know how to create condition for starting electrical heating under 50 and stopping at 55.
Something like that:
if temperature < 70
photovoltaic on
else
everything off
if temperature < 50
electrical heating on and stops at 55°C
Thanks for advice.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Power and Energy Systems dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

