필터 지우기
필터 지우기

calling a function only when the check box is clicked

조회 수: 11 (최근 30일)
Aash
Aash 2018년 5월 7일
댓글: Dennis 2018년 5월 7일
i have to call a function when push button is pressed only when the check box is ticked. in checkbox call back iahve written following code
if (get(hObject,'Value') == get(hObject,'1'))
linkaxes_sheep();
end
and in push button callback I have written
get(handles.checkbox1,'value')
this is giving error . can someone help
  댓글 수: 1
Dennis
Dennis 2018년 5월 7일
You wont need checkboxcallback for this. Add the following condition to your pushbutton callback.
if get(handles.checkbox1,'value') == 1
%do stuff
end
In general please be more specific about your problem. 'this is giving error' can mean alot - best would be to copy paste the entire error message.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by