Hi there,
I have a problem related with using minlmoptimize method for curve fitting.
I tried to create a vector of fi[i] of each data point, as shown below, then pass them into the minlmoptimize function. 
Code:
        public static void function_fvec(double[] vars, double[] fi, object obj)
        {                        
            double[] tempfuncs = new double[10];
            
            for (int i = 0; i < 10; i++)
            {
                tempfuncs[i] = Math.Abs(data_y[i] - simu(vars, data_x[i])); //compare input data and calculated results.
            }
            fi= tempfuncs;            
        }
However, it seems does not work. Can someone help me out?
Thank you!