[vtkusers] Trouble with least squares
David Doria
daviddoria+vtk at gmail.com
Thu Nov 19 15:26:29 EST 2009
On Thu, Nov 19, 2009 at 2:46 PM, Denis Barbier <bouzim at gmail.com> wrote:
> On 2009/11/19 David Doria wrote:
>> I am trying to find the least squares solution of a system (Ax = b). I
>> tried to make a demo here:
>> http://www.vtk.org/Wiki/Least_Squares
>>
>> but it crashes with some memory errors. Can anyone see where I have gone wrong?
>
> Hi, you wrote
> vtkMath::SolveLeastSquares(NumberOfSamples, X, NumberOfVariables, Y,
> NumberOfSamples, M);
> instead of
> vtkMath::SolveLeastSquares(NumberOfSamples, X, NumberOfVariables, Y, 1, M);
>
> Denis
>
Dennis,
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?
Thanks,
David
More information about the vtkusers
mailing list