Help with basic GUI that answers why
显示 更早的评论
I'm trying to get an understanding on basic GUI stuff. As a test, I tried to make a window with a button and a static text, and upon pressing the button, the 'why' function returns an answer in the static text. To do this, I have under the function_pushbutton1_Callback the code
set(handles.whydisplay, 'string',why);
which returns the 'Too many output arguments' error. This code works with other strings, numbers, and functions that give numerical outputs. I don't understand why it doesn't work here, and what I'm missing.
采纳的回答
更多回答(1 个)
Image Analyst
2017-3-24
Try editing it
>> edit why.m
Now change the first line to
function a = why(n)
Then save why.m, and try your code again.
类别
在 帮助中心 和 File Exchange 中查找有关 Calendar 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!