Created
June 12, 2017 08:31
-
-
Save masayukeeeee/a01cb6960fdbfbc4b3d29431ce75422c to your computer and use it in GitHub Desktop.
Sample Nelder and Mead 1965 1 for R
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
# objective function | |
obj_func <- function(x){ 100*(x[2]-x[1]^2)^2 + (1 - x[1])^2 } | |
# initial value | |
x1 <- c(-1.2, 1) | |
# nelder and mead method | |
Nelder_mead(x1, obj_func=obj_func) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment