How to get the multiplication of two variable elements

S is a three-dimensional array variable in CVX, how can I express these constraints in CVX?

This question has been proved to be a LP question.

Feel free to use nested for loops. I leave it to you to keep straight the messy indexing. If you write code that is correct in MATLAB, it should also work in CVX. You need to learn “regular” MATLAB indexing well before you try CVX on messy problems.

Also see my answer to your related question at How to express the maximum value of an array variable in CVX for writing subsequent constraint conditions .