Optimisation of function containing matrix
古いコメントを表示
I am having trouble optimising this system. I have been trying to use fmincon without success.
C is a 16x16 matrix, mo and v and 1 are 16x1 vectors. I want to choose mo to maximise x = c*mo+v
The constraints are: the components of mo must add to one (I think I've done this one)
and each component of x should be equal, that is x1=x2=...=x16 where x=c*mo+v (I have no idea how to represent this)
fun = @(mo) -C*mo-v;
A=[];
b=[];
Aeq= ones(1,16);
beq= 1;
lb = zeros(16,1);
ub = ones(16,1);
m0 = 1/16*ones(16,1);
mo = fmincon(fun,m0,A,b,Aeq,beq,lb,ub)
Please let me know where I'm going wrong...
3 件のコメント
Fabio Freschi
2019 年 10 月 10 日
編集済み: Fabio Freschi
2019 年 10 月 10 日
Can you share C and v?
Isabelle Steinmann
2019 年 10 月 10 日
Fabio Freschi
2019 年 10 月 11 日
It is better to attach data as mat file
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!