I am having a little trouble understanding what you want. I will assume that your complex function is not a complex valued function and that you need a VI with adjustable parameters that calculates fitting error.
I should explain what analytic means for those unfamiliar with the term. An analytic function is one that has a derivative at every point on its domain (the x in f(x)). An example of a non analytic function is f(x)=|x| because there exists no derivative at x=0 although it is piecewise differentiable.
I recommend doing the error fitting the old fashion way by doing calculations on the difference between the model and your function. If you are trying to find the least squares error, just square the difference of every point (or a whole lot of p
oints) and sum them.
Jeremy Braden
National Instruments