Thank you for your answer!
The reason you are asking for is that I used a different Matlab toolbox before and so I have a lot of code written up in which I repeatedly implemented several kinds of symbolic variable operations. Now I would like to switch to using Yalmip but, if possible, without having to rewrite those parts of my code.
Sorry, I am afraid I did not understand your hack recommendation. Maybe I didn’t explain correctly, I try again differently: I have an expression, like fun = 3*x, where x is a syms variable. That expression resulted from previous computations. Now I would like to use this expression, for example in a SOS program, which I would like to solve using Yalmip. Clearly, for this I need x to be an sdpvar. So my question is, is there a way to change the syms variable to an sdpvar in fun? And if so, how?