action with no side effect error

5 visualizaciones (últimos 30 días)
Amish Rughoonundon
Amish Rughoonundon el 16 de Mzo. de 2016
Comentada: Tania Izquierdo el 5 de Dic. de 2016
Using stateflow with matlab R2015b.
In the first state that is connected to the "default transition" arrow, I tried to use a simple if statement as shown below
IDLE
entry:
if(a==0)
b=1;
else
b=0;
end
Compiler is indicating that this is an error as follows:
else
^^^^^
'IDLE' has an action with no side effect.
Occurred in chart 'testSubsystem/testChart', 'IDLE'. [2 similar]
Component: Stateflow | Category: Parse warning
Unresolved data 'else' in 'IDLE'.
Component: Stateflow | Category: General error
Unresolved data 'end' in 'IDLE'.
Component: Stateflow | Category: General error
Unresolved function 'if' in 'IDLE'.
Component: Stateflow | Category: General errorOpen
Parsing failed for machine: 'test'
Component: Simulink | Category: Model error
I'm seriously confused why a simple if statement is not compiling right. I have attached the statflow project to this question for good measure Any help would be highly appreciated, Amish

Respuestas (0)

Categorías

Más información sobre Complex Logic en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by