How can the handle to the currently visible Stateflow.Box object be obtained?
It is possible to obtain the handle to the currently visible Stateflow.Chart object by using the following command:
>> s = sfroot;
>> c = s.find('-isa', 'Stateflow.Chart', '-and', 'Visible', 1);
What is the equivalent property for a Stateflow.Box object? The following command returns an empty 0x1 handle:
>> b = s.find('-isa', 'Stateflow.Box', '-and', 'Visible', 1);
NOTE:-
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
Expert Answer
Kshitij Singh answered . 2021–10–21 06:54:54
The command returns an empty handle because the Stateflow.Box constructor does not have a ‘Visible’ method. Hence, it would not be possible to programmatically query the currently visible Box object similar to how a Chart object is queried.
There are two possible ways in which this can be achieved:
1. If you are interested in programmatically querying and obtaining a handle to a currently visible Stateflow Object (chart, box, state etc.), click on the object-of-interest
and then use the ‘sfgco’ command.
2. If you are already aware about the names of the objects to be queried, then it is possible to directly filter these objects out by using their names:
SEE COMPLETE ANSWER CLICK THE LINK