LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -20068

Hi,

I'm trying to fit a circle in a dataset to find its radius (c) and centre (a,b).  I know I could use the fit sphere.vi but I wanted to try this. In fact I used it with the same dataset and it succesfully (and accurately) obtains  both the radius and the center. I've created the equationEq.PNG

and built the fitting vi (Attached) but there's always this -20068 error complaining about the dataset.

Thanks for the help!

0 Kudos
Message 1 of 8
(3,025 Views)

Did you look up the Error Message?  [Help, Explain Errors].  It says "Something is NaN, Not a Number".  Look at your formula,  Assume c = 0, which reduces the equation to 

Y = sqrt (-(X-a)^2) + b.  Now assume that you plug in a value of X that is different than a.   Do you see a problem, something that might evaluate to "Not a Number"?  [Or, possibly, Not a Real Number?]

 

Bob Schor

0 Kudos
Message 2 of 8
(2,992 Views)

Hi Bob,

Thanks for your reply. I understand that. It will always happen when trying to fit a circle with a smaller radius than what the imposed coordinates suggests but how the fit sphere.vi bypasses this problem? The equation of a circle is what it is.

Thanks a lot!

0 Kudos
Message 3 of 8
(2,963 Views)

@cobayatron wrote:

Hi Bob,

I understand that. No, you do not. It will always happen when trying to fit a circle with a smaller radius than what the imposed coordinates suggests but how the fit sphere.vi bypasses this problem? The equation of a circle is what it is.

True, but you were not fitting the equation of a circle, which is a quadratic equation!!  Look it up.


Bob Schor

0 Kudos
Message 4 of 8
(2,950 Views)

Love is in the air! Ok, I'll look it up

0 Kudos
Message 5 of 8
(2,942 Views)

The equation of a circle with radius r and center at (a, b) is (x-a)² + (y-b)² = r²,  No square roots here.

 

Bob Schor

0 Kudos
Message 6 of 8
(2,898 Views)

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 8
(2,877 Views)

To get 'r' you need to Square root the whole shebang.

"I put my root beer in a Square cup, now it's just beer."

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(2,874 Views)