momentmodel
momentmodel derives the semidefinite relaxation model of a polynomial program without solving it.
Syntax
[ConRelaxed, ObjRelaxed] = momentmodel(Con,Obj,RelaxationOrder)
Example
Consider the following polynomial program
sdpvar x y
Con = [x^4 + y^4 + x*y <= 1];
Obj = x^2 +y^3;
We can compute lower bounds using solvemoment, or alternatively derive the semidefinite relaxation (here lowest order possible) and proceed manually.
[ConRelaxed, ObjRelaxed,MomentMatrices] = momentmodel(Con,Obj)
optimize(ConRelaxed,ObjRelaxed);
value(MomentMatrices{3})