annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

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
Messaggio 1 di 8
3.049Visualizzazioni

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
Messaggio 2 di 8
3.016Visualizzazioni

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
Messaggio 3 di 8
2.987Visualizzazioni

@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
Messaggio 4 di 8
2.974Visualizzazioni

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

0 Kudos
Messaggio 5 di 8
2.966Visualizzazioni

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
Messaggio 6 di 8
2.922Visualizzazioni

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Messaggio 7 di 8
2.901Visualizzazioni

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
Messaggio 8 di 8
2.898Visualizzazioni