Prevent sparse matrix

Hello,
I have a square matrix as a decision variable; P(n,n), and I’m using nested loops in cvx to define the constraints and refer to specific elements of P(i,j). However, cvx sees P(n,n) as a sparse matrix, hence I can’t retrieve the specific elements of the square matrix P(n,n) since the order of the elements is altered due to sparsity. Is there a way of preventing cvx from treating a decision variable matrix sparse? Thank you

Please show a simple example, with explanation, and with all input data, of the difficulty you are encountering.