title: Why trust-region-reflective algorithm in fmincon require a gradient as input?
body: <p>According to Matlab fmincon <a href="https://au.mathworks.com/help/optim/ug/fmincon.html#busog7r-nonlcon" rel="nofollow noreferrer">documentation</a>, the 'trust-region-reflective' algorithm needs to specify the objective gradient. I read the algorithm <a href="https://au.mathworks.com/help/optim/ug/constrained-nonlinear-optimization-algorithms.html#brnpd5f" rel="nofollow noreferrer">explanation</a> but yet, I cannot understand the reason for that.
  1- Why does it need gradient as input?
  2- Does the objective function have to be analytical? since my objective function, is function handle that calculates some matrix as output
  Thanks for your help in advance</p>