, . mygui, . . , . , .
. , . . . . Tag chbxGridx, string, , .
, Tag chbxGridY, string . , , . - .
, , . Callback . value , , , , . chbxGridX chbxGridY handles. XGrid YGrid .
Callback btnPlot ( 5).
5. btnPlot
function btnPlot_Callback(hObject, eventdata, handles)
%
x=[-2:0.2:2];
y=exp(-x.^2);
plot (x,y)
%
if get(handles.chbxGridX, 'Value')
% ,
set(gca, 'XGrid', 'on')
else
% ,
set(gca, 'XGrid', 'off')
end
%
if get(handles.chbxGridY, 'Value')
% ,
set(gca, 'YGrid', 'on')
else
% ,
set(gca, 'YGrid', 'off')
end
%
set(hObject, 'Enable', 'off')
%
set(handles.btnClear, 'Enable', 'on')
. .