It is possible to record the mouse position continuously in MATLAB without the need for mouse-click events to occur. The current cursor (mouse) position on a figure window can be read by using the 'CurrentPoint' property of the figure. Since you need this mouse position to be read each time the mouse moves, you would assign a callback function to the 'WindowButtonMotionFcn' property of the figure window. This callback function would then read this 'CurrentPoint' property mentioned above.
For example, open a new figure window at the MATLAB prompt. Now, we set the 'WindowButtonMotionFcn' property to point to the callback function which will execute each time the mouse moves on the figure. We will create this callback function in a bit, but for now we will call it 'mouseMove'. The following statement assigns this callback function.
set (gcf, 'WindowButtonMotionFcn', @mouseMove);
Now we create this callback function in the MATLAB editor by typing 'edit mouseMove' at the MATLAB command prompt. An example of the callback function is shown below but in your function, you should include the steps that you want to take when the mouse moves.
function mouseMove (object, eventdata)
C = get (gca, 'CurrentPoint');
title(gca, ['(X,Y) = (', num2str(C(1,1)), ', ',num2str(C(1,2)), ')']);
Save this function in the path and then move your mouse over the figure. The mouse position will continuously be printed in the title of the axes.