how to programtically add junctions and default transition in state flow and connect them
5 views (last 30 days)
Show older comments
wenchao zhang
on 17 Aug 2023
Commented: wenchao zhang
on 22 Aug 2023
hello, as following shows i want use script to add the defualt transition and two junction, and connect two junctions, add the action label, how to do

0 Comments
Accepted Answer
Fangjun Jiang
on 17 Aug 2023
Edited: Fangjun Jiang
on 17 Aug 2023
transition = Stateflow.Transition(ch);
transition.Source = [];% this makes it default transition.
transition.Destination = j2;
transition.LabelString = '{xx;yy;zz;}';
6 Comments
Fangjun Jiang
on 22 Aug 2023
It is char(10) or newline();
transition.LabelString = ['{xx;',newline,'yy;',newline,'zz;}'];
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!