I am using a global variable, which is registered as a Data Store Memory, in a MATLAB Function block and this block is inside a For Each Subsystem. During simulation, why do I get the following error?
The Stateflow chart 'For Each Subsystem/MATLAB Function' cannot be placed inside a subsystem containing a "For Each" block. This might be because of one or more of the following reasons: 1. The chart has a data with scope "Data Store Memory". 2. The chart accesses machine parented data. 3. The chart exports functions. 4. The chart is placed in a model with machine parented events. 5. The chart calls exported functions or Simulink functions from outside this chart. 6. The chart has a message
Best Answer