Log operation with "Error: Invalid quadratic form(s): not a square"

    variable S_m_k_11(N, M)
    variable p_m(N, M)
    maximize( sum(sum(alpha1.*(log(S_m_k_11 .* p_m + B*delta2 )./log(2)  ))));

    subject to

where alpha1 is a N*M matrix, B and delta2 are constants.

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

Error in q_m_p_m_calc_CVX (line 65)
maximize( sum(sum(alpha1.(log(S_m_k_11 . p_m + B*delta2 )./log(2) ))));

I am a beginner, please help me. Thanks a lot.

The objective function violates CVX’s DCP rules. Moreover, it is not everywhere concave, as can be seen looking at a simple case, such as log(x*y + 1) where x and y are both variables.

See Why isn't CVX accepting my model? READ THIS FIRST!