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

📄 xralflin.m

📁 等高线拟合源代码(matlab源码)
💻 M
字号:
function xralflin(delta_step, nr_of_points, at_line)% Part of GUI% Calculate distance xr and angle alfa by linear regression% Draw found tangent to contour%% 21 april 1999% Walter Verdonck,% All the software included in this package is presented as is.% It may be distributed freely. The author can, however, not be% held responsible for any problems whatever.% % Designed by Johan Baeten, Walter Verdonck% Last updated: 29-03-2000% Johan.baeten@mech.kuleuven.ac.beglobal BEELD MAINFIGBEELD = get(MAINFIG, 'userdata');[im_xs, im_ys] =size(BEELD);if nargin  == 3 ,   delta = delta_step; 	m = nr_of_points;  	al = at_line;else	delta = 2; % distance between consecutive lines to search points	m = 5;     % number of points for least squares Solution	al = im_ys/2; % at the center line endstartpos = [1 al-delta*floor(m/2)];for j = 1:m   [x(j) y(j) color] = iseffil(startpos,0,im_xs,0);   startpos(2) = startpos(2) + delta;endy=y-al;y(2,:)=1;p=y'\x';line(polyval(p, [y(1)-6 y(length(x))+6]),[y(1)+al-6 y(length(x))+al+6]);results = [' ... Results: Distance (from left) ' num2str(p(2)-0.5) ];results = [results ' [pix] and angle (with vertical axis) ' num2str(p(1)) ' [rad].'];seterror(results)

⌨️ 快捷键说明

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