Fmincon failure in optimizing an objective function which includes determinant of a matrix.
1 回表示 (過去 30 日間)
古いコメントを表示
Here, fmincon is not working with the below mentioned objective function, and same was working when i was finding the frobenious norm of the matrix. Can someone please help me out in this?
Nr=4;No=1;
N = 4;
h = sqrt(0.5)*(randn(N,N)+1i*randn(N,N));
g = sqrt(0.5)*(randn(N,N)+1i*randn(N,N));
phi0 = zeros(N,1);
lb = zeros(N,1);
ub = 2*pi*ones(N,1);
obj = @(phi)-det(eye(Nr)+((g*diag(exp(1i*phi))*h)*(g*diag(exp(1i*phi))*h)')/No);
[sol,~] = fmincon(obj,phi0,[],[],[],[],lb,ub);
0 件のコメント
採用された回答
Bruno Luong
2022 年 11 月 24 日
Make sure your objective function returns real numerical output
Nr=4;No=1;
N = 4;
h = sqrt(0.5)*(randn(N,N)+1i*randn(N,N));
g = sqrt(0.5)*(randn(N,N)+1i*randn(N,N));
phi0 = zeros(N,1);
lb = zeros(N,1);
ub = 2*pi*ones(N,1);
obj = @(phi)-det(eye(Nr)+real(((g*diag(exp(1i*phi))*h)*(g*diag(exp(1i*phi))*h)'))/No);
[sol,~] = fmincon(obj,phi0,[],[],[],[],lb,ub);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Nonlinear Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!