Sinisa,
To use the NonLinearFit function in the .NET version of Measurement Studio, you have to create a delegate function based on the ModelFunctionCallback outline. In other words, you would create a function like:
public delegate double MY_FUNCTION(double x, double[] coefficients)
{
//Set Y (Return Value) to something in relation to x and any number of coefficients, the example below is for y=ax^2+bx+c
return(coefficient[0]*x*x + coeffecient[1]*x + coeffecient[2]);
}
Then when you actually call the NonLinearFit function, you will pass MY_FUNCTION in the ModelFunctionCall parameter. The nubmer of coeffecients that you send to the NonLinearFit function should match the number that you have in your MY_FUNCTION. The algorithms within the functions wil
l then take it from there to create the best values of the coefficients to fit the curve. I hope this explains these functions a little more. If you have any other questions, feel free to post back. Have a good one.
Adam B.
Applications Engineer
National Instruments