?? 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 + -