LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I modify the NonLinear curve fit in 7.1 to a new formula?

My problem is something like this.
I am a beginner in LabVIEW and I have been trying to put together a piece of program that would acquire, analyze and display data from dynamic light scattering. I used a Formula Node to create a autocorrelation function which works a lot faster that the function that is on the functions palette and I have my final results in array and graph forms. I tried to look at the examples provided in the software package for some nonlinear fitting and I found the NonLinear Lev-Mar Fit.vi which would do something close to what we needed, but not enough. The autocorrelation data looks as a simple exponential decay, but the fitting procedure needs an extra term in the fitting equation to account for any undesired noise in the solution of interest. That term includes an Exponential Integral which LabVIEW had in its special function section. The problem that I have is to Modify the Lev-Mar fitting vi to account for the change. My formula looks something like:
 
f = (B*exp(-A*x) + (1 - B )* ExpIntegr (g*x))^2
 
where A and B are our fitting coefficients and the information of interest is included in A.
Thank you very much for your time.
0 Kudos
Message 1 of 2
(2,584 Views)
What is g? A constant? Another fitting parameter?
 
It is hard work to adapt the old lev-mar fit to a new model. Things are much improved in LabVIEW 8.0+, where the model VI is called via reference and tons of other improvements were implemented.
 
I made similar improvements in 7.1 and you can e.g. try to modify one of my many such postings. I posted one involving exponential integrals a long time ago.
 
 
To adapt, just change the model and adjust the number of parameters if needed.
 
For details, check the original thread. Let me know if you have any questions.
0 Kudos
Message 2 of 2
(2,572 Views)