Azzera filtri
Azzera filtri

action with no side effect error

10 visualizzazioni (ultimi 30 giorni)
Amish Rughoonundon
Amish Rughoonundon il 16 Mar 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

Risposte (0)

Categorie

Scopri di più su Complex Logic in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by