Error using .* (line 262) Disciplined convex programming error: Invalid quadratic form(s): not a square

X(ii,k,m) is kind of a mess. It appears to violate multiple DCP rules. Even if it were DCP-compliant, it isn’t affine, and therefore taking its norm is not allowed. Please re-read Why isn't CVX accepting my model? READ THIS FIRST! and the CVX Users’ Guide.

help cvx/norm

Disciplined convex programming information:
norm is convex, except when P<1, so an error will result if
these non-convex “norms” are used within CVX expressions.
norm is nonmonotonic, so its input must be affine.