问题描述
我想确定以下积分函数的p
的最优值
f13 =function(x,p){
x+2*p}
可以使用p
函数来确定nlminb()
的最佳值
obfun=function(p){
infn=integrate(f13,lower = -5,upper = 5,p=p)$value
infn}
nlminb(c(5),obfun)
f13 =function(x,p,q){
x+2*p+q}
obfun=function(p,q){
infn=integrate(f13,p=p,q=q)$value
infn}
在这种情况下,nlminb()
无法正常工作。
nlminb(c(5,10),obfun)
感谢您的帮助。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)