How to deal with this probelm?


clc,clear;
close all;

N = 10;
A = rand(N,1) + 1irand(N,1);
A = (A
A’);
A = (A + A’)/2;
B = rand(N,1) + 1irand(N,1);
B = (B
B’);
B = (B + B’)/2;
b = rand(N,1) + 1i * rand(N,1);

rho1 = 1;
lam1 = 0;
mu1 = 0;
gamma1 = 1;
beta1 = 1e3;
iter_max = 1e3;

for iter = 1:iter_max

cvx_begin quiet 
variable x1(N,1) complex

minimize (real(x1'*A*x1) + rho1 / 2 * square_pos(abs(b'*x1+lam1/rho1)) + square_pos(norm(max(real(x1'*B*x1)+mu1/rho1,0))))

cvx_end

end

norm doesn’t do anything (except cause error message), because its argument is a nonnegative scalar, so it would leave its argument unchanged (if allowed by CVX).

So change
square_pos(norm(max(real(x1'*B*x1)+mu1/rho1,0)))
to
square_pos(max(real(x1'*B*x1)+mu1/rho1,0))