MATLAB: How to get starting and ending point of mouse cursor

current pointmouse movement

I need to calculate the difference between the initial point and the point where the mouse cursor is while the mouse is moving. What I'm doing now is that I've calculated the rotation matrix, and all I have to do is to click the mouse at one point and move the mouse around.This action will rotate the image, at the same time, while moving the mouse. Only when I let go, the image will stay at the resulted image.
I've done something similar to http://www.mathworks.com/help/techdoc/ref/rbbox.html. But I don't want the 'finalRect=rbbox'
Does anyone know how to remove the rectangle rubberband, and the 2 current point remain the same?