Stav dette: Introduction to stateflow with applications