⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windowbuttonmotionfcn.m

📁 一个关于数据聚类和模式识别的程序,在生物化学,化学中因该都可以用到.希望对大家有用,谢谢支持
💻 M
字号:
userData=get(gcf, 'userdata');
inData=userData.inData;
pointLabel=userData.pointLabel;
circleH=userData.circleH;
textH=userData.textH;

temp = get(gca, 'CurrentPoint');
pos(1,1) = temp(1,1);
pos(2,1) = temp(1,2);
xlim=get(gca, 'xlim');
ylim=get(gca, 'ylim');
if (xlim(1)<=pos(1) & pos(1)<=xlim(2) & ylim(1)<=pos(2) & pos(2)<=ylim(2))
	distance=pairwiseSqrDistance(pos, inData(1:2, :));
	[minValue, minIndex]=min(distance);
	set(circleH, 'xdata', inData(1, minIndex), 'ydata', inData(2, minIndex));
	set(textH, 'string', pointLabel{minIndex}, 'position', [inData(1:2, minIndex); 0]');
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -