Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Using CNiMath::LeastSquaresFit()

Could you please take a look at the project I've posted which is trying to use the LeastSquaresFit() using the data provided in the help file? When I compile I always get the following message:

Math Exception : Input Matrix is Singular. The system of equations cannot be solved.


Thanks in advance,

Grant
Grant M. Johnson
Project Engineer
LECO Corporation
0 Kudos
Message 1 of 3
(3,638 Views)
Hello

This was actaully a reported issue. We are working to correct this in the future release of Measurement Studio. The way around this is to initialize the stdDev vector with a non-zero value. This will not affect the outcome of the LeastSquareFit function.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
Message 2 of 3
(3,638 Views)
Thanks. I set the stdDev vector to all 1's and it works great.

Grant
Grant M. Johnson
Project Engineer
LECO Corporation
0 Kudos
Message 3 of 3
(3,638 Views)