I am trying to solve the optimization problem given below:
\max log_2det(\delta * H * H')
trace(\delta) < 3
Here, H is a 3$\times$3 matrix and \delta (the optimization variable) is a diagonal matrix of the same size. Here is the code I have written:
H = [1 2 3; 4 5 6; 7 8 9];
variables double(v(1,3)) % Objective Function maximize (log2 (det (diag((v)) * H * H'))) % Constraints subject to 1 <= trace(diag(v)) < 3;
However, I am getting an error that says, “Error using sparse sparse(A) does not accept char inputs A. Use sparse(double(A)) instead.” What am I doing wrong here? Thanks in advance for the help.