Invalid object handle error in Matlab

怎甘沉沦 提交于 2019-12-02 03:39:34

I suspect this is for a Matlab GUI?

If so you need to pass the handles variable to the script, normally matlab passes eventdata and hObject as well as a standard procedure for all functions, callbacks and etc.

function ex(hObject, eventdata, handles)

And don't forget to update the GUI data to close the function.

guidata(hObject,handles);

I think all your nested functions that use the handles structure are going to require this as well.

Hope this helps.

Finally, I have found that there was a cla command line, which was the guilty of the error, in the main program.

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