Skip to content

Instantly share code, notes, and snippets.

@gufodotto
Created July 8, 2012 01:21
Show Gist options
  • Save gufodotto/3068891 to your computer and use it in GitHub Desktop.
Save gufodotto/3068891 to your computer and use it in GitHub Desktop.
Lorentz_varia
target_pars <- c(a = -9/3, b = -5, c = 30); target_pars
target <- solveLorenz(target_pars)
guess_pars<-c(a = -6/3, b = -8, c = 20); guess_pars
guess <- solveLorenz(guess_pars)
# print(system.time(Fit <- modFit(p = guess_pars, f = Objective))) # this works
# print(system.time(Fit <- modFit(p = guess_pars, f = Objective, method="SANN", control=list(maxit=100), lower=c(-5,-10,0)))) # this works too
# print(system.time(Fit <- modFit(p = guess_pars, f = Objective, method="SANN", control=list(maxit=10000)))) # this works too
print(system.time(Fit <- modFit(p = guess_pars, f = Objective, method="Nelder-Mead", control=list(maxit=1000)))) # this works too
# print(system.time(Fit <- modFit(p = guess_pars, f = Objective, method="Nelder-Mead", control=list(maxit=10000)))) # this works too
Fit$par
bullet_pars <- Fit$par
bullet <- solveLorenz(bullet_pars)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment