https://technicalsource9.medium.com/using-for-loop-to-change-array-values-in-simulink-stateflow-72836f5aec6b