Needs Checkbox to draw a plot
2 views (last 30 days)
John on 14 Jun 2012
Write an if statement that gets the value of the checkbox. When the checkbox's value is 1 then plot. This snip of code would have to be written under the function of the checkbox.
for example if the checkbox's tag is 'checkbox1' then:
if get(handles.checkbox1,'Value') == 1
More Answers (1)
Benjamin Schwabe on 14 Jun 2012
I am not sure where you are stuck, so I try to be a little more detailed than John.
Use GUIDE to design you GUI with drag and drop. Save the GUI. Then double click on the checkbox and the m-File openes at the callback function of the ckechbox. Then use the if statement as John suggests.