Using class object data within another function
显示 更早的评论
Hello
Apologies, probably a fairly simplistic question but I can't seem to get it to work so any help appreciated.
I am using App Designer and am trying to use the value of an object defined within the app class of the GUI script as a variable in an external function I am calling:
end
% Button pushed function: Button
function Folder_creator_v3(app, event)
val = app.TestType.Value;
Folder_creator_v3();
% if val == 1;
%
% %%%
%
If I copy the full content of the "Folder_creator_v3" function into the GUI script, it is able to use the value for 'val' but if I specify it in this manner, when I call the function as an external file it says the variable is unspecified.
Could someone please let me know the correct syntax/method to allow the Value for TestType to be used as a variable in the external function?
Thanks!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!