How can I run a function on app designer using a push button?
24 次查看(过去 30 天)
显示 更早的评论
I am attempting to run a function which can be run freestanding outside of app designer, however I have a few of the sam functions I would like to pair in a GUI. I keep getting the following error associated to the lines of code which follow it:
Error using Hip_Analysis_App
Too many output arguments.
Error in Interface_5_26_2020/HipButtonPushed (line 49)
app.Hip
Line 34-36: function Hip(app)
app.Hip = Hip_Analysis_App;
end
Line 48: function HipButtonPushed(app, event)
Line 49: app.Hip
Any help resolving this issue would be greatly appreciated.
0 个评论
回答(1 个)
Cris LaPierre
2020-5-28
Based on the error message, it appears your function Hip_Analysis_App does not have any outputs. Check your function declaration in the file.
If it look like this
function Hip_Analysis_App
call your function in the app like this
Hip_Analysis_App;
Also note that the function has to be in the current folder or on the MATLAB path.
If your function is supposed to be returning a value, then update your function declaration to place the output variable in the declaration (out here)
function out = Hip_Analysis_App
0 个评论
另请参阅
类别
在 Help Center 和 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!