From: Roger Stafford on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hrdtn2$iit$1(a)fred.mathworks.com>...
> Roger, I don't think Roger it should not be any accuracy problem by fixing F=1. It is like divide the original implicit ellipsoid equation by F, and the linear equation to be solved is:
>
> M = [x.^2,y.^2,x,y];
> X = - M(:,1:4) \ ones(4,1)
>
> A = X(1)
> C = X(2)
> D = X(3)
> E = X(4)
> F = 1
>
> In contrary, it should be more accurate (if not equal), because the new matrix above is submatrix of the 5-column matrix, thus the ratio of singular values becomes smaller because it is the projection.
> ........
- - - - - - - - - -
Hello Bruno. I ran a test of many randomly generated ellipses determined by four points so as to pass through the origin, and indeed what you stated seems to be true. In such situations, the

"-[x.^2,y.^2,x,y]\ones(4,1)"

method appears to do as well as the

"null([x.^2,y.^2,x,y,ones(4,1)])"

method on the average, even though I sometimes spaced the four points rather closely together.

That is surprising to me because, with the theoretical ellipse running precisely through the origin, in principle the value of F should be exactly zero. The four-element method does indeed produce extremely large values for the remaining coefficients in an effort to minimize the effect of that F value of one and is apparently successful in doing so. Nevertheless I remain uneasy using such an algorithm, depending as it does on wayward round off errors for not actually going precisely through the origin. If it did, that method would encounter a truly singular matrix whose results in principle should have infinite values.

As it is on my machine, with such ellipses that method always produces the disturbing notice: "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = [some exceedingly small number]." It is easy to believe that the message might eventually be right in some special circumstances which I haven't managed to test.

I suspect if and when the same kind of problem arises again I shall be sorely tempted to continuing using the 'null' function to find solutions for this homogenous type of equation. It seems more appropriate to my mathematical "soul".

Roger Stafford