set (gcf, 'WindowButtonMotionFcn', @mouseMove);
其中moveMove為Callback function name
1: function mouseMove (object, eventdata)
2: C = floor( get(gca, 'CurrentPoint'));
3: title(gca, ['(X,Y) = (', num2str(C(1,1)), ', ',num2str(C(1,2)), ')']);
全站熱搜
set (gcf, 'WindowButtonMotionFcn', @mouseMove);
其中moveMove為Callback function name
1: function mouseMove (object, eventdata)
2: C = floor( get(gca, 'CurrentPoint'));
3: title(gca, ['(X,Y) = (', num2str(C(1,1)), ', ',num2str(C(1,2)), ')']);