Hi, everyone.I have problem to solve the following question, which is convex.

and this is my code

cvx_clear

cvx_begin

variable v_hat(T,d,K) complex

expression E(d,d,K)

% v_hat = V;

for k = 1:K

E(:,:,k) = eye(d) - v_hat(:,:,k)’* H(:,:,k)’* U(:,:,k) - U(:,:,k)’* H(:,:,k)* v_hat(:,:,k);

E(:,:,k) = E(:,:,k) + sigma^2 * U(:,:,k)’* U(:,:,k);

for m = 1:K

E(:,:,k) = E(:,:,k) + U(:,:,k)’* H(:,:,k)* v_hat(:,:,m)* v_hat(:,:,m)’* H(:,:,k)’* U(:,:,k);

end

end

minimize (sum(weights(k) * trace(W(:,:,k) * E(:,:,k))))

subject to

norm(v_hat(:,:,:), 2) - PK <= 0;

cvx_end

V = v_hat;

error in line 86:

Disciplined convex programming error:

Invalid quadratic form(s): not a square.

I recently started to learn it, please help me