Text this: Introduction to stateflow with applications