This can be done using the Stateflow API:
rt = sfroot;
modelHandle = rt.find('-isa','Simulink.BlockDiagram','$MODELNAME');
disconnectedTransitions = modelHandle.find('-isa','Stateflow.Transition','-and','Destination',[]);
The variable disconnectedTransitions will be an array of Stateflow.Transition objects that are not connected to a destination object. These transitions should come from any Stateflow chart within the model. $MODELNAME in the above code should be replaced with the name the model containing the charts/transitions. The VIEW method of the Stateflow.Transition object can be used to view the location of specific transitions.
Best Answer