From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fitting inverse tangent function

Hi,

 

I am working on fitting a nonlinear function of form,

 

y=k1+arctan(k2*x) for a data set that I have. I have attached a vi that loads a file, let me extract some data from the file and then perform the plotting. I am not able to get a good fit at all. Any clues..?

 

Thanks,
Deepak

LAB View 2010 SP1
0 Kudos
Message 1 of 3
(2,815 Views)

You did not include any subVIs* or any data.

 

* (missing are at least: LabViewMeasurementfiles.vi, CurveFitting.VI. Are these from a toolkit?)

 

Your program is layed out as a worm. I would suggest a state machine instead.

0 Kudos
Message 2 of 3
(2,799 Views)

In cases where the derivatives are simple I would bag the string model and use the nonlinear fit VI with a VI giving both f(x) and f'(x).

 

FitArcTangent.png

Download All
Message 3 of 3
(2,796 Views)