Imposing many zeros through equalities will not be efficient.
Assume E is a matrix containing the 0/1 sparsity pattern. Then I would do
An alternative, which is more efficient if X is very large since it avoids the initial symbolic generation, is
[i,j] = find(triu(E));
X = sparse(i,j,sdpvar(length(i),1);X = X+X'-diag(diag(X));