Almost there! This is what I have, now :
You can see my checkbox, top, left-hand, circled in red -- wow! I added this code to create the control :
cb = uicontrol('Style','checkbox','String','triSurf','Position',[10 500 75 150],'Value',1,'Callback',@checkBoxCallback);
cb.Visible = 'on';
Then I added this function to handle the callback :
function checkBoxCallback(source, event)
value = get(source,'Value');
if value == 1
Problem is -- please excuse my ignorance -- the checkbox state? When the script is ran, initially, the Value = 1 option in the declaration sets the checkbox state to checked, as far as I can see. This is how the control shows up in the interface. I think it's logical to have the checkbox checked since the trisurf plot is initially visible. When I click on the ckeckbox, however, nothing happens : I have to click one more time and then, the checkbox becomes unchecked but the trisurf is still visible? It's only when I click a third time that the checkbox starts to work as 'expected'. I attached the new code. It's not the end of the world but...
One newbie question in passing, if I may...
I'm using global variables 'sparingly'... Are there better ways to do this, without getting too overly complex?