就是要写一个根据鼠标移动到图表位置返回坐标值的功能,网上COPY的代码如下:
function CurPosShow(OpSet)
handles=guidata(gcbo); % get handles
X=get(gca,'XLim'); % x range of current axes
Xmin=X(1);
Xmax=X(2);
Y=get(gca,'YLim'); % y range of current axes
Ymin=Y(1);
Ymax=Y(2);
AxName=get(gca,'Tag'); % name of the current axes
hTX=findobj(gcf,'tag',['TX' AxName(end)]); % find correspond text box x
hTY=findobj(gcf,'tag',['TY' AxName(end)]); % find correspond text box y
set(gcf,'windowbuttonmotionfcn',''); % dissable all callback in figure
set(gcf,'windowbuttonmoti
最后
以上就是热心戒指最近收集整理的关于matlab 常见gui函数,关于matlab GUI开发中windowbuttonmotionfcn函数使用的全部内容,更多相关matlab内容请搜索靠谱客的其他文章。
发表评论 取消回复