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

5 次查看(过去 30 天)
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.name', 'data.scope', etc. but can't see where I can get the port number. Can anyone help me with this?

采纳的回答

Jorge Calvo
Jorge Calvo 2021-10-5
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
4
  4 个评论
Jorge Calvo
Jorge Calvo 2021-10-8
编辑:Jorge Calvo 2021-10-8
You can use sfroot instead of sfgco. That will look at all the Stateflow charts you have loaded.
>> x = find(sfroot,Id=301);

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Complex Logic 的更多信息

产品


版本

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by