Filter löschen
Filter löschen

action with no side effect error

10 Ansichten (letzte 30 Tage)
Amish Rughoonundon
Amish Rughoonundon am 16 Mär. 2016
Kommentiert: Tania Izquierdo am 5 Dez. 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

Antworten (0)

Kategorien

Mehr zu Complex Logic finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by