ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
07-13-2011 02:31 PM
Hey there, Labview Gurus!
So, I’ve got this program that generates data and then graphs the curve of points with a Leven-Marq best fit lorentzian. I’ve got it working the way I want, but then I was told to use the Least Squares method instead (which involves using the constrained nonlinear curve fit VI).
Originally I was trying to avoid this, as it used references and the like for f(x,a), which I don’t know anything about. I was trying to find some sort of aid or tutorial, but everything is so complicated. Can someone simply point me in the right direction of a ‘how to’ or, give me a brief low down on what I’d like to accomplish?
This has been my issue really, finding that the simple stuff is what I don’t grasp.
A million thanks,
Vari
Solved! Go to Solution.
07-14-2011 06:46 PM
In order to do this, you need to use the template that is referenced in the help file to create the fitting model. Save that VI, and wire that filepath into an Open VI Reference. Next, right click on the f(X,a) terminal of the Constrained Nonlinear Curve Fit VI and select Create >> Constant. Disconnect that constant from the curve fit VI, and connect it to the type specifier VI refnum terminal of the Open VI Reference. Then wire that to the reference terminal of the Constrained Nonlinear Curve Fit VI. When you are done, that part of the code should look like this;
Hope that helps!
07-14-2011 06:56 PM - edited 07-14-2011 06:57 PM
I would advice agains using a vi reference via a constant filename, because it make keeping track of the model more difficult, especially when building a standalone application or moving the project around.
All you need is a strictly type VI reference, e.g. as follows:
(See also)
07-15-2011 09:46 AM
That was the first code that I tried, but I just can't stand coercion dots. It's my own personal OCD tick. 😉
07-15-2011 09:52 AM
07-15-2011 12:26 PM
Good info there. Thanks!