📄 algcircle.m
字号:
function [z, r] = algcircle (X);%ALGCIRCLE Algebraic circle fit%% [z, r] = algcircle (X);% fits a circle by minimizing the "algebraic distance"% in the least squares sense a x'x + b'x + c = 0%% X : given points <X(i,1, X(i,2)>%% z, r: center and radius of the found circle B = [ X(:,1).^2+X(:,2).^2 X(:,1) X(:,2) ones(size(X(:,1)))]; [U S V]= svd(B); u = V(:,4); a = u(1); b =[u(2); u(3)]; c = u(4); z = -b/2/a; r = sqrt(norm(z)^2 - c/a);end % algcircle
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -