DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a least squares adjustment of user defined functions to data

Hi,

I would like to use DIAdem for least squares adjustment of my data. DIAdem supports "approximation", but only for pre-defined (polynomial, ...) functions. But how to do fitting for self defined functions? I guess I have to do this via a script. Or ss there any other way to do it? I would be happy to see an example.

Regards,

Dietrich
0 Kudos
Message 1 of 3
(3,554 Views)
Hi Dietrich,

You can't do user-defined least-squares fitting of completely arbitrary fitting functions in DIAdem. You can run regression based on several popular function types:

Linear: a + b*x
Power: a*x^b
Exponential: a*e^(b*x)
Logarithmic: a + b*log(x)
Logarithmic: a + b*ln(x)

You can to a limited extent also define a combination of some formula components to run curve fitting against. You can choose any combination of the following formula components:

Polynomial: constant, x, x^2, ... x^11
Rational: 1/x, 1/(x^2), 1/(x^3), 1/(x^4)
Exponential: e^x, 10^x, e^(x^2), ... (short list)
Radical: x^(1/2), x^(1/3)
Logarithmic: Log(x), Ln(x)

Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,543 Views)
Did you ever figure out how to fit to an arbitrary function. I am pulling my hair out trying to do this. I have about 10 points x,y data that I waat to fit to an arbitray function. I have used the Curvefitting express vi setting the input to non-linear and was finnaly able to enter my founction into the model box properly, however, the vi is looking for a signal input (time,y) rather than x,y data.

Any help would be appreciated.

p.s. One of the function I am trying to fit is the Steinhart and Hart function for thermistor data fits.
0 Kudos
Message 3 of 3
(3,448 Views)