Created
March 26, 2014 15:20
-
-
Save agirault/9785832 to your computer and use it in GitHub Desktop.
minimize phi(alpha) using a cubic model - linesearch with step length selection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M1 = [alpha_prev^2, -alpha_cur^2; -alpha_prev^3, alpha_cur^3]; | |
M2 = [phi_alpha - phi_0 - phiP_0*alpha_cur; phi_prev - phi_0 - phiP_0*alpha_prev]; | |
M = M1 * M2 * 1/(alpha_prev^2 * alpha_cur^2 * (alpha_cur - alpha_prev)); | |
a = M(1); | |
b = M(2); | |
alpha = (-b + sqrt(b*b - 3*a*phiP_0))/(3*a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment