I am using fminsearch in MATLAB to iteratively find the answer of a function. But it seems like the fminsearch cannot fulfill my expectation. So I ask this question whether there is any way to do what I want.
According to MATLAB help, fminsearch finds the minimum of a scalar function of several variables, starting at an initial estimate. So, if I am correct, I think this command finds an answer of the function at which the error of the iteration is minimum.
However, what I want to do is the same iteration process but the output I want is not an answer of the function at which the error is minimum. I want to know all errors in that iteration process (not an answer of the function).
Is there any way to do this task? I have tried so hard but I am a new bee and Mathematics is not my major. Thank you very much.
In the interest of providing an answer, the functions in the Optimisation Toolbox have an option called
Display. Setting theDisplayoption toiterwill show information from the optimisation function at each iteration.