Setup

The following few lines setup the codes we'll need

Working on the Rosenbrock function

Rosenbrock with scaled gradients

Rosenbrock using exact gradient descent

In this case, we otpimally solve the line-search problem using ApproxFun

Another function