MATLAB: Do I receive a syntax error message if I assign a vector to an output in the ‘Action’ section under ‘Action Table’ of the truth table in Stateflow 7.2 (R2008b)

stateflow

I have created a truth table in Stateflow 7.2 (R2008b) which executes a certain action based on the input conditions.
However, if I assign a vector to the output in one of the prescribed actions, I receive a syntax error as follows.
Wght = [255, 0]
^
syntax error
Occurred in chart 'Chart', transition #1191, line 3.

Best Answer

The ability to accept array/vector values in the 'Action' field of the truth table is not available in Stateflow 7.2(R2008b). It can accept only scalars and variables.
As a possible workaround, define variables (data objects) in the chart inside Model Explorer, assign these vectors to them and set their scope to 'Local'.
In addition, specify the corresponding values for 'Size' of the vector and 'Initial Value (Expression)' under the 'General' and 'Value Attributes' tabs respectively in the Model Explorer.