From: E on
Hi,

Problem:

I extract a curve (an object's profile) from an experimental image, and I have a routine (a system of BVP differential equations, solved numerically) that predicts the objects profile based on experimental values and one unknown parameter. I would like to fit the predicted profile to the experimental profile by changing the one unknown parameter.

More details:

The routine simulates a 3-stage experimental process, so there are actually 3 routines, ie, there is one system of BVPs differential equations solved in each stage. The solution from the first is used in the second stage, and the solution from the second stage is used in the final stage. Each stage is solved using a shooting method and BVP4c. Its the numerical output in the third and final stage that I am interested in fitting to experimental data. The unknown parameter is a constant input that is used in every stage, so I don't think its possible to solve for it explicitly using the BVP solver.

My current method:

Brute force, fit polynomials to the experimental and predicted profiles, calculate the residuals, change the unknown parameter slightly, run the routine again and calculate the residuals, adjust the unknown parameter up or down accordingly , hopefully continue until residuals are less than some set value. Its a pretty rough code, i guess may main concern is that it may be finding local minimums in the residuals instead of global. I was hoping there might be a better way to go about this.

Sorry for all the text,
Thanks,
E