sdpvar x1 x2;
p = 2*x1^4+3*x1^2*x2^2+2*x1*x2^3+4*x2^4;
z = [x1^2 x1*x2 x2^2]';
Q = sdpvar(length(z));
Fs = [coefficients(p-z'*Q*z,[x1,x2])==0];   % set に代わる新しい記述形式 []
Fs = Fs+set(Q>=0);
solvesdp(Fs)