fitcircle.m

バージョン 1.0.0.0 (39.3 KB) 作成者: Richard Brown
Fits circles to 2D data using nonlinear least squares to minimise geometric error
ダウンロード: 7.1K
更新 2007/5/21

ライセンスの表示

Although a linear least squares fit of a circle to 2D data can be computed, this is not the solution which minimizes the distances from the points to the fitted circle (geometric error). The linear solution minimizes the algebraic error of a function something like
f(x) = ax'x + b'x + c = 0

Minising the geometric error is a nonlinear least squares problem. fitcircle allows you to compute either - it uses the algebraic fit as the initial guess for the geometric error minimization.

e.g.
x = randn(2, 10);
% Linear least squares fit
[z, r] = fitcircle(x, 'linear')

% True best fit (minimizing geometric error)
[z, r] = fitcircle(x)

For more information look at the published demo file.

This submission is based on the paper:
"Least-squares fitting of circles and ellipses", W. Gander, G. H. Golub, R. Strebel, BIT Numerical Mathematics, Springer 1994

A similar submission for ellipses should be forthcoming

引用

Richard Brown (2024). fitcircle.m (https://www.mathworks.com/matlabcentral/fileexchange/15060-fitcircle-m), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R14SP3
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0