【发布时间】:2016-07-19 18:13:40
【问题描述】:
我正在为我的一个脚本开发 MATLAB GUI。我的脚本有“开始”按钮,我在该按钮下调用函数来求解方程。我有3个数字。所以到目前为止,我的 GUI 运行良好。发生的情况是,当用户在提供所需输入后单击“开始”时,3 个数字会一一弹出,并且我已经指定了保存数字的位置。循环很小的时候看起来不错,但是当循环很大时,计算时间会增加,所以弹出的数字会让用户感到恼火,因为用户无法做任何事情。
我想在 GUI 中引入一个单选按钮,取消选中该按钮将禁用图形的可见性。 我尝试了 figure('Visible','off') 并且效果很好,但现在我希望它与单选按钮链接。
单选按钮回调是:
% --- Executes on button press in checkbox2.
function checkbox2_Callback(hObject, eventdata, handles)
% hObject handle to checkbox2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of checkbox2
谁能帮我确定代码的框架,以使此单选按钮打开-关闭按钮中数字的可见性:
function Start_Callback(hObject, eventdata, handles)
% hObject handle to Start (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
等待您的帮助。
【问题讨论】:
标签: matlab