I was searching how to do the same thing a few months ago.
You want the motor to be on while you're holding the mouse click down and stop as soon as you lift up.
Roughly you have to set the enable property of the push button to inactive. Yeah I know, it sounds weird.
Then you have to add ButtonDownFcn function to the pushbutton if it's not already in the GUIDE created code. You can do this by right clicking on the pushbutton in GUIDE and find it in the view call back I believe.
The only problem is that, since the button is inactive, its appearance will not change while clicked.
apparently you also have to add a WindowButtonUpFcn to the main window (figure1) in my code, which recognize when the mouse is not down via a global variable I called buttonDown.
I attached a code and a Fig file there are 4 buttons (decrease and increase) that has the same characteristics.
Although you won't be able to run it as it should be connected to a function generator to work, however, I change the code so only the left bottom button (decrease) will work. try it ;)
You know how to do it know, it's just the matter of trying.