golden_search: One-diminsional Search Algorithm

Description Usage Arguments Examples

View source: R/golden_search.R

Description

Find the minimum of a function using the Golded-section search algorithm

Usage

1
golden_search(x, a, b, tol = 1e-04)

Arguments

x

function with one argument

a

min value of search values

b

max value of search values

tol

tolerance level. Default is 1e-04

Examples

1
2
3
4
contfunc = function(x){
  -exp(-x) * sin(x)
}
golden_search(contfunc, a = 0, b = 1.5)

ddsjoberg/sjofun documentation built on June 25, 2021, 6:50 p.m.