How to get block handle of Interpreted Matlab function from its .m function

久未见 提交于 2019-12-11 12:44:06

问题


I have an interpreted MATLAB function in my Simulink model. I want to get the block handle or port-handle of this block from user defined .m function implemented in it (say it test.m).

I tried

h = get_param(gcb, 'PortHandles'); % for port handle   
b = gcbh ;                         % for block handle

Both gives port handle/block handle for recently clicked block, which I don't want. I want the port handle/Block handle of the interpreted MATLAB function, which is executing this code via .m function (test.m). Is there any way to achieve this?

Any help is appreciated.

来源:https://stackoverflow.com/questions/35425619/how-to-get-block-handle-of-interpreted-matlab-function-from-its-m-function

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!