11-20-2008 11:20 AM - edited 11-20-2008 11:25 AM
11-20-2008 03:43 PM
11-20-2008 04:01 PM
11-20-2008 04:16 PM
To fit a function to a model you should use the "nonlinear curve fit" tools. It seems weird to calcuate the sum of squares inside the fit function and then use optimization.
Here's a simple rewrite, see if it makes sense.
(of course with periodic funtions you need to be very careful that you don't fit to an alias frequency).
11-20-2008 05:02 PM
altenbach,
Good catch on the missing decimal for the data point in the cosine function. Before attaching the VIs I hastily entered default values and must have typed one. I'm aware of the problems fitting periodic functions. Thankfully, my particular function is not periodic. I was finally able to fit my parameters to my function using Unconstrained Nonlinear Optimization with the Downhill Simplex implementation, Quasi-Newton and Conjugate Gradient will not converge. Can the "nonlinear curve fit" tool be used for functions with two independent variables?
-Frank
11-20-2008 06:16 PM
humorgram wrote:
Can the "nonlinear curve fit" tool be used for functions with two independent variables?
07-27-2011 12:03 AM
Hi Altenback,
So what is the difference between using the L-M curve fit subVI and the optimization subVI?
I am also working on this and have used L-M curve fitting subVI but I have been told this is not a good approach due to the non-uniqueness problem.