MATLAB: If-Else inside Stateflow Chart

coder errorif elsemodel errorsignalssimulationstateflow

Hello all, I am using if-else conditions indside a stateflow chart. When I try to simulate the chart, I get model and coder error. The error says "Chart input data 'signal_name' on left hand side of an expression. I am not able to figure the problem. If anyone knows a solution to this, please let me know.
Thanks in advance.
Cheers, Rashmi

Best Answer

In that case You have to implement a new output variable (output to Simulink). And to this output variable, you can assign the input variable's value.
You can't set value to an input variable.