SDP example help

Dears
I have an optimization problem that I know that it could be solved using SDP. The issue is I’m not familiar with the topic and the literature is a bit complicated. Is there a clean and fairly simple example that shows how to convert a problem into SDP notation with its implementation to be solved? It would be a great help. Also, for a problem with many variables, should all of them be in the X vector or we can have some variable out of the X vector?

Regards

CVX lets you declare as many scalar, vector, and matrix variables as you want, with whatever names you want. That is different than some optimization solvers which only allow a single vector variable.

Here are some SDP examples in CVX. http://stanford.edu/class/ee363/notes/lmi-cvx.pdf

Thanks Dr.Mark for your reply.
Let’s say I have the following constraints (as an example of my problem. I have other similar constraints as well)

[(x_a)^2+(y_a)^2]-[(x_a).(x_b)+(y_a).(y_b)]+z+w=0
[(y_a).(x_b)-(x_a).(y_b)]-z+w=0

w,x,y and z are all variables. a and b are indices (like line a and line b)
. here means multiplied, so we have (x_a).(x_b) which means x of line a multiplied by x of line b. Since both are continuous decision variables, this is non convex as it it but as far as I know, a SDP relaxation can help here. Am I right?

How can I write these constraints using CVX?

That is not a CVX question. if you want to guidance on whether/how to relax to an SDP, perhaps seek help at https://math.stackexchange.com/ or https://or.stackexchange.com/ And if you do, it might benefit you to not be so mysterious, if your thought of using SDP relaxation is based on some specific article or book you read.