# How to assign variable in cvx?

Suppose our variable is w_{jk} where j=1:V and k=1:M and w_{jk} \in C^{3\times 1}. then how we can assign this variable in cvx? Please clarify. Assume an optimization problem: min_{w,y} \sum_{k=1}^M(|\sum_{j=1}^V h_{jk}^Hw_{jk}|^2 \over y_{k}+\sigma_{k} where h_{jk}\in c^{3 \times1} then how can we write it in cvx?

Please clarify what you are trying to do.

Sir,the above given is a beamforming vector and I have to optimize it with some constraint. So, how variable of such type is assign in cvx. as, suppose we have to optimize X where X is a variable so we assign variable X as variable X(n,n).

Perhaps you’re just talking about using N-D arrays? For instance, variable w(3,V,M) complex declares a complex matrix of size 3\times V\times M, so w(:,j,k) is a 3\times 1 vector.

Thanks a lot sir, I got it…