How to write the SDP(Semidefinite program) of the following optimization problem \begin{multline} \begin{aligned} \max_{Z,f ,g} \ && trace(KZ) − f^Td \\ \text{subject to} && trace(W^{−1}Z) &= k && \\&& Z_{ij} ≥ 0 \\ && Z = Z^T \\ && Ze = Wf \\ &&e^Tf = (1 + α)n \\ &&e^T g ≥ (1 − β)n \\ &&f \geq g \\ &&0 \leq g \leq 1 \end{aligned} \end{multline}
I have written the following code for the above optimization problem in the cvx matlab.
cvx_begin SDP
variables Z(n_datapoints,n_datapoints) f(n_datapoints,1) g(n_datapoints,1)
minimize ((f' * d ) - trace(K * Z))
trace(inv(W) * Z) == k_classes
Z >= 0
Z == Z'
(Z * e) == (W * f)
e' * f == (1+alpha)*n_datapoints
e'* g >= (1-beta)*n_datapoints
f >= g
g>= 0
g <= 1
cvx_end
Above code is giving error in line "minimize ((f' * d ) * trace(K * Z))" Error : "Error in . there is no other information showing. "I am new in cvx. Can anyone help me why I am getting this error. Sorry for the bad indentation of the mathematical expression.