- You can use if-else statements within the function’s actions to mimic conditional logic.
- Alternatively, try moving any conditional logic up to the parent chart instead of placing it inside the function.
[MATLAB - R2011b] Transition actions are relevant only in inner/outer paths of a state.
3 views (last 30 days)
Show older comments
i have a object Stateflow.Function,
i can't set transition condition for transition in function, but Matlab R2017b is ok.
can i set transition condition for transition in function in MATLAB R2011b?

Thanks you very much!
0 Comments
Answers (1)
Akanksha
on 29 Aug 2025
In R2011b, you can’t add transition conditions directly inside graphical functions as the ability to add transition conditions (guards like [mode==ON]) inside graphical functions was not available in R2011b.
This feature was introduced in later releases .
Here is the workaround if you need to make it work in R2011b version :
Example :
function turn_boiler(mode)
if mode == ON
data = 1;
color = GREEN;
else
color = RED;
end
% continue with actions
end
Hope this helps!
0 Comments
See Also
Categories
Find more on Stateflow Charts in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!