How can I get the port number of a StateFlow input given it's handle programatically?

3 views (last 30 days)
I have the handle of a StateFlow input from a previous find result. I'm trying to get the port number for that StateFlow input. I've been using the sf('get',<handle num>,<field name>) command for other fields like '', 'data.scope', etc. but can't see where I can get the port number. Can anyone help me with this?

Accepted Answer

Jorge Calvo
Jorge Calvo on 5 Oct 2021
It sounds like you are working with Stateflow.Data objects, where you have the ID property and want to find the Port property. In that case, you can do this:
>> x = find(sfgco,Id=301);
>> x.Port

Sign in to comment.

More Answers (0)


Find more on Simulink Functions 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!