quaddecomp is used to extract the numerical representation of a quadratic expression

## Syntax

[Q,c,f,z,info] = quaddecomp(p)


## Examples

Define a quadratic function and extract data generating the quadratic function, and check that the data is correct. Note that the order of the variables might be completely different compared to your natural ordering, hence the 4th output collects variables in the used order.

x = sdpvar(3,1);
y = sdpvar(3,1);

p = sum(x+2*y)^2 - sum(2*x.^2+y.^2) + sum(x+2*y);


[Q,c,f,z,info] = quaddecomp(sdpvar(1)^3);