Quantcast
Channel: MATLAB Central - File Exchange - tag:"least squares"
Viewing all articles
Browse latest Browse all 522

Fitting a conic to a given set of points using Levenberg-Marquardt method

$
0
0
321082011-07-06T21:45:01Z2011-07-06T21:45:01Z

A general conic can be uniquely describe by the following equation up to a scale factor: Ax^2+Bxy+Cy^2+Dx+Ey+F=0Then (A,B,C,D,E,F) is often called algebraic parameter vector of the conic.Usage: [ParA,RSS,iters,code] = fit_conicLMA(XY,ParAini,LambdaIni)Child functions:Residuals_ellipse, Residuals_hyperbola, AtoG( can be found from previous submissions) , JmatrixLMA (included in the main function)Input:XY:given points i=1 to nParAini = [A,B,C,D,E,F]'- the initial parameter vectorLambdaIni: the initial value of the control parameter LambdaOutput:ParA: vector of algebraic parameters of the conic foundRSS: the Residual Sum of Squares (the sum of squares of the distances)iters:# of iterationscode: type of the conic: 1 - ellipse 2 - hyperbola 3 - parabola -1 - degenerate cases 0 - imaginary ellipse 4 - imaginary parallel lines(in practice, only ellipses and hyperbolas should turn up)


Viewing all articles
Browse latest Browse all 522

Trending Articles