Can you tell me these equations come from where in MATLAB fmincg.m?

A = 6*(f2-f3)/z3+3*(d2+d3);  % cubic fit
B = 3*(f3-f2)-z3*(d3+2*d2);
z2 = (sqrt(B*B-A*d2*z3*z3)-B)/A;

It is either cubic extrapolation or interpolation. I have looked for these equations in many websites and books of numerical optimization but but I do not find these equations even in the book "Numerical Optimization by Peter Glynn, Stephen M. Robinson p:57". It is not same in the fmincg.m

  • $\begingroup$ Welcome to SciComp.SE. I think that we need not information here, what are f2, f3, d2, D3, z3? $\endgroup$
    – nicoguaro
    Apr 16, 2019 at 13:45
  • $\begingroup$ in the line search...f2,f3 second and first function...d2,d3 their derivative...z3 first step length alpha0....z2 second step length $\endgroup$ Apr 27, 2019 at 17:22
  • $\begingroup$ Those details should be in the text of the question. $\endgroup$
    – nicoguaro
    Apr 27, 2019 at 17:30
  • $\begingroup$ Not an answer to this question, but it gives a little more background: stackoverflow.com/a/12161027/2452869 $\endgroup$
    – Anton Menshov
    May 10, 2019 at 4:29


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.