I would really appreciate if someone helps me out with this MATLAB problem. I have uploaded both MATLAB file (which is not working properly) and the question.
Dear Parham, I think running the program partly or line by line is helpful. If you run the program step by step, and loop by loop, I expect you to find the error shortly.
Hi, you can directly use the following MATLAB function : fminsearch that uses the Nelder-Mead simplex (direct search) method instead of trying to implement your own version. Best