This is an example of my problem:
objfun2 = function(x){x}
optimize(objfun2,interval = c(1,5),lower=1,upper=5, tol = 0.1,maximum = F)
I would like to define an optimize function with specific bound, where the function will give me bound if necessary.
Here, I would like to have the result 1
, but the result is near but not the bound value. Thanks in advance.