Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
初级会员
注册日期: 2012-03-15
帖子: 1
声望力: 0 ![]() |
![]()
我m-file里写的是
function y=obj2(x) % a function of 20 variables % temp=0; for i=1:20 temp=temp+x(i)^2; end y=temp; end 我想用trust region 来求最小值,但是在fminunc需要我提供gradient function, 对上面的function我应该怎么给他的gradient?谢谢! |
![]() |
![]() |