LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Least absolute residual mode on "linear fit vi" fails if two or more x points are zero.

Solved!
Go to solution

I have just had a system go down because I had some complex data that had more than one data point at re=0.

 

The linear fit vi returned NaN for slope and intercept.

The function then returned a nonsense error code that seems totally unrelated to the problem.

Error -20055 occurred at an unidentified location
Possible reason(s):
Analysis:  The number of categories or samples must be greater than one.

 

The data was totally valid and the fitting should have been trivial. The implementation is hidden in a DLL, so I can't see why it failed.

Is there something obvious I am missing here?

 

Snippet to reproduce attached.

 

Message 1 of 7
(2,803 Views)

nevermind…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,789 Views)

Bug was there in 2011.

If there are 2 points with x=0, least absolute residual (and only it) fails.

0 Kudos
Message 3 of 7
(2,750 Views)

Yes, definitely a bug. Substituting machine epsilon (or even 1e-200!) for zero works fine. 😮

 

 

 

(It is annoying that the code is trapped inside a dll, else we could see what the problem is. :()

 

Is there a CAR?

Message 4 of 7
(2,743 Views)

@altenbach wrote:

Yes, definitely a bug. Substituting machine epsilon (or even 1e-200!) for zero works fine. 😮

 

 

 

(It is annoying that the code is trapped inside a dll, else we could see what the problem is. :()

 

Is there a CAR?


Hopefully they will CAR it if its not already. Anyone at NI confirm if one exists for this?

 

Its easy enough to work around when you know the problem exists.

Not so easy when it crashes a production system on the other side of the world.

 

To say the last few days were stressful is a bit of an understatement.

 

 

0 Kudos
Message 5 of 7
(2,732 Views)
Solution
Accepted by topic author deceased

A CAR has been created to cover this problem.

-Jim

Message 6 of 7
(2,706 Views)

Cheers Jim.

0 Kudos
Message 7 of 7
(2,693 Views)