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

📄 addpoint.m

📁 等高线拟合源代码(matlab源码)
💻 M
字号:
function addpoint(x, y)%addpoint Adds points to the list.global FITHANDLESglobal UICTRHANDLESglobal XSIZEglobal YSIZEglobal IMAGENAMEglobal NEWIMAGENAMEglobal MAINFIGglobal VIEWSIZEglobal NUMBER   % only in this m-filemaxnrofpoints = 12;nrofpoints = get(FITHANDLES(1,12), 'value');[x_size,y_size]=size(get(MAINFIG,'userdata')); xl = get(gca,'xlim'); yl = get(gca,'ylim');% range for pixels from 1 to 128 e.g pixels 64 lies just befor the index 64  if ((x >= xl(1)) & (x<= xl(2)) & (y >= yl(1)) & (y <= yl(2))),   nrofpoints = nrofpoints + 1;   set(FITHANDLES(2,nrofpoints),'enable','off');   set(FITHANDLES(1,12),'value',nrofpoints);   x=x-0.5; y=y-0.5;   set(FITHANDLES(2,nrofpoints),'enable','off');   set(FITHANDLES(3,nrofpoints),'string',num2str(x),'value',x);   set(FITHANDLES(4,nrofpoints),'string',num2str(y),'value',y);   routine('plotpunten');   if (nrofpoints < maxnrofpoints),      set(FITHANDLES(2,nrofpoints+1),'enable','on');   else     routine('stopadding');     seterror(' Maximum number of points reached.');   end   FILECHANGED = 1;end   

⌨️ 快捷键说明

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