Error in variable declaration

i have defined 2x2 matrix in variable command inside cvx
for ex:
variable S;
maximise function
cvx end
result i got is a 1x3 vector and not a matrix.
if i enter variable S in command window there is no display of matrix value

Please read the user guide. You declared S to be a scalar in your model.

how to declare variable in cvx