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

📄 min_ratio.m

📁 matlab aamtool box
💻 M
字号:
function [error] = min_ratio(X, I)
pts = I.pts;
index = I.index;
ind = setdiff(1:size(pts,1), index);
pts_x = pts(:,1);
pts_y = pts(:,2);
pts_x(ind) = X(:,1);
pts_y(ind) = X(:,2);



% cla
% plot(pts_x, pts_y, 'or'); hold on;
% text(pts_x, pts_y, num2str((1:length(pts_x))'));
% plot(I.O(:,1), I.O(:,2), 'og');
% axis([-3 3 -3 3]);
% axis tight;
% drawnow;

error = 0;
for i=1:size(pts_x,1)
    for j=1:length(pts_x)
        RATIO(i, j) = sqrt((pts_x(j) - pts_x(i))^2+ (pts_y(j) - pts_y(i))^2);                
    end
end
error = sum(sum((RATIO - I.ratio).^2));
error = sqrt(error);

⌨️ 快捷键说明

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