I have a question about callback functions in MATLAB's GUIDE. I have the following code execute when a button is pushed:
handles.xPos=handles.xPos+1 addX = handles.xPos handles.shape2 =fill ([-2+addX 1+addX 1+addX -1+addX], [1 1 -1 -1], 'r');
This works, but only once (and the old shape is still there, but that is a separate problem). I have done debugging code and have determined that the callback function is always called when the button is pushed, but for some strange reason there is no effect in the change of the position after the first push of the button.
What am I doing wrong here?