[英]Matlab how to call function m.file from callback function that locate in another m file?
我有那個功能在+ Time文件夾中
function pickdate(handler,jPanel)
end
在另一個m文件中,我具有回調功能
uicontrol('parent', grid,...
'Style','popup',...
'unit','normalized',...
'String',datestr(now,'mm/dd/yyyy'),...
'tag','pickdateto',...
'callback',{'Time.pickdate',jPanel});
如何調用該函數並傳遞jPanel參數?
在函數中,您需要三個變量,如下所示:
function pickdate(handler,event,jPanel)
end
和回調看起來像這樣:
'callback',{@Time.pickdate,jPanel});
現在它的工作!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.