matlab鼠标拖动一个点需要的最小代码,get,set和@选中-改变-拖动三个函数的使用
function mousedragglobal current_selected xy_start xdata_start ydata_starth=plot(1,1,’*’);set(h,‘ButtonDownFcn’,@select);set(gcf,‘WindowButtonUpFcn’,@change_state,‘WindowButtonMotionFcn’,@move)endfunction select(obj,event)global current_selected xy_