something strange with test 2, my implementation fails on this test (because two iterations take me considerably closer to the minimum), perhaps this is something to do with the different forms of linesearch we are using?
Test case 2 is changed to account for your subsequent comment and to also to be far enough away from the solution so that it cannot converge in 2 iterations.
Test case 2 still have problems, I have implemented the Fletcher-Reeves Conjugate Gradient Method from 1964, and it got rejected at the 2nd test. I believe the problem is that you are requesting precision from the approximation of an approximation. And this can only be done when we are very close to the solution. Test 1 seems to have the right precision for 1 iteration.
Replace NaNs with the number that appears to its left in the row.
Find state names that start with the letter N
Largest Twin Primes
Coin Tossing: Probability of Same Heads for N tosses
Golomb's self-describing sequence (based on Euler 341)
Free Fall analytical solution (Chapra 2012 textbook Example 1.1)
Bisection method of finding a root.
Quasi-Newton Method for Unconstrained Minimization using BFGS Update
Composite Trapezoidal Rule for Numeric Integration
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office