"The 'Label' property name is ambiguous in the 'Transition' class " error

3 views (last 30 days)
Hello, i'm trying to create a stateflow with code. i have already created 2 states and a Transition between them :
add_block('sflib/Chart', 'autoDS/Chart'); %Create Chart Block
rt = sfroot;
m = rt.find('-isa', 'Simulink.BlockDiagram', '-and', 'Name', 'autoDS'); % block diagram
ch = m.find('-isa','Stateflow.Chart', '-and', 'Name', 'Chart'); % chart
st = Stateflow.State(ch); % state
st.Label = 'CMD_28V_Avion';
st1 = Stateflow.State(ch); % state
st1.Label = 'CMD_28V_Avion2';
st2 = Stateflow.Transition(st);
st2.Source = st;
st2.Destination = st1;
The problem is when i'm trying to set the Label of the transition :
st2.Label = '[115V==1]';
i have this error :
The 'Label' property name is ambiguous in the 'Transition' class.
I don't know if there are 'rules' for how to set Transition.Label i didn't found any informations.

Answers (0)

Community Treasure Hunt

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

Start Hunting!