[vtkusers] Trouble with least squares
Denis Barbier
bouzim at gmail.com
Thu Nov 19 16:32:15 EST 2009
On 2009/11/19 David Doria wrote:
[...]
> Denis,
>
> You are correct, thanks. However, I tried to do this in a real application:
>
> http://www.vtk.org/Wiki/Quadric_Surface_Fitting
>
> But I get an error: Unable to factor linear system
>
> Do you know what could cause this?
First, there is a typo, you have to replace
X[i][4] = p[0];
by
X[i][4] = p[1];
In your dataset, |x| == |y|, and thus the first 2 columns of X are
identical, and matrix X' * X is singular.
Denis
More information about the vtkusers
mailing list