LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fitting data with a square root model

Good day,

 

I've got an array of data to which I'm trying to fit to the model y = A*sqrt(x-x.0), basically the upper half of a parabola crossing at an arbitrary x-coordinate.  I'd be using A and x.0 as the fit parameters.  What's the best way to define this sort of model?  It's not a standard one as far as my (limited) experience goes.

 

Thanks for your suggestions!

 

0 Kudos
Message 1 of 5
(2,835 Views)

I'm trying a Lev-Mar approach, but I've never used one before.  My attempt is attached, but the code keeps exploding when I try to run it...

0 Kudos
Message 2 of 5
(2,828 Views)

Can you repost your VI with default data saved in the controls?

 

You might ry expressing your function in terms of y^2 to get rid of the sqrt.  If x-x0 is negative then sqrt will yield NaN. 

-Jim

0 Kudos
Message 3 of 5
(2,819 Views)

Sorry.  Thought I had...

 

 

0 Kudos
Message 4 of 5
(2,812 Views)

Are you sure your model is a good match for your data?  Seems off to me.  The Y-values range from approximately -.0006 to .0012, but your model can only generate all-positive or all-negative Y values.

0 Kudos
Message 5 of 5
(2,788 Views)