Problem with fmincon:row dimension of Aeq must have 4 column(s).

2 ビュー (過去 30 日間)
Ylenia Placella
Ylenia Placella 2020 年 11 月 15 日
編集済み: Ylenia Placella 2020 年 11 月 15 日
% non linear constraints:
% D is a matrix 69x69
for h=linspace(h_min,h_max,69)
x=zeros(69,69);
c=h-x(1)'*D*x(2);
end
function [c,ceq]= contr (x)
ceq=[];
c=c;
end
f=@(x)x(1)'*sigma*x(2); %sigma is a a matrix(69x69)
nonlcon=@contr;
Aeq=ones(1,N);
beq=1;
l_b=[];
u_b=[];
x0=zeros(n,1);
A=[];
b=[];
sigma_2rao = zeros(1,length(h));
sigma_2rao(1)=var_min;
[x_rao(:,i),sigma_2rao(i)] = fmincon(f,x0,A,b,Aeq,beq,l_b,u_b,nonlcon)

回答 (0 件)

カテゴリ

Help Center および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by