Some background for people reading this in the future (in case it\'s not locked). I tend to do my programming in a high level language to understand the problem first. After
I think MATLAB has lots of limitation over normal C coding. I agree that there are so many inbuilt blocks which can be used directly but if you write a code in MATLAB then it will take nearly 5 times longer in comparison to C code because from defining variables to taking loops, switch cases, its very time consuming in MATLAB modeling
And suppose you have made a model using Simulink but when you try to add something then again it's very time consuming but in C it is just 2 minute task.
The next problem is that you can't comment out any piece of model as you do in other programming languages.
For a big project sometimes MATLAB gets crashed, correpted, sometimes hang and simulation in stateflow is like a sh*t.
In the end I just say one thing, that use MATLAB modeling (stateflow+simulink) only if you have lots of patience.