Matrix input and matrix variables in minimization of an objective function
이전 댓글 표시
I have three variables S,V,B .Each variable is a 16*1 Matrix. I'd like to minimize an objective function, which is a summation of variables in these matrices. There are also some linear constraints for this model. I get the error "Not enough input arguments" on this optimization model:
% [S,V,B,fval]=fmincon('objfun',x0,[],[],[],[],[-Inf(N,1),-Inf(N,1),zeros(N,1)],[Inf(N,1),Inf(N,1),ones(N,1)],'constraint');
I guess the way I define the input variables is not right.
I've attached the main code, the objective function and the constraints. I would be appreciated if you could take a look and help me.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!