Removing for cycles.

for cycles are not needed. It was an error. Moreover I had a small meeting with Paolo and he explained me how to define a variable in a simulink block as a parameter and be careful to define it not tunable.