why fminsearch result does not fit the original data?

2 views (last 30 days)
Hi I have optimized a four-parameter function by minimizing the mean square differences of the function values and those of direct measurement. My function is a discreted integral equation and includes many terms (incrementally increasing). The number of direct measurements to which the optimization should be done is 110. At the first sight it seems that the code works well and the resulted parameters are acceptable but the problem appears when I double check the parameters by substituting them in the function and plot the function values, it does not fit the direct measurement values and there is a divergence after the point 70. I checked the code for different number of points. When I optimized the function for point numbers less than 70 (e.g. 50, 60, 65, …) the parameter values were independent from the initial values. By increasing the number of points included in the optimization process to around 100, it reaches to maximum iter (10e4) and funeval (10e8) after a long time and for entire points (i.e. 110), the resulted parameters are depended to the initial values and function values does not fit the direct ones. For different point numbers divergence exist in the function values after point 70. I do not know why this is happening in fminsearch, good fit for some points and a sharp divergence after it. I do previously thank for your help. Is the number of terms to be optimizes using fminsearch limited?
  1 Comment
Star Strider
Star Strider on 14 Aug 2014
The problem is likely not with fminsearch, since it should easily handle a four-parameter problem.
We need to see your function and your data (a (110x2) array is relatively small). It will also help if you describe your data, your model, and what you are doing. You can attach your data file (use the ‘paperclip’ or ‘staple’ icon above the window), and post the relevant lines of your code as an edit to your original question or in a comment to it.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!