getbase returns the whole numerical basis which builds an expression

Syntax

B = getbase(p)

Examples

sdpvar variables are built-up from internal variables multiplied with numerical data. The numerical basis is extracted using

yalmip('clear')
x = sdpvar(1);
y = sdpvar(1);
p = 2 + 3*x + 4*y;
full(getbase(p))
ans = 
    2 3 4

This is a completely generic and fundamental structure in YALMIP. For matrices the base is vectorized

p = ones(2) + [1 2;3 4]*x + [5 6;7 8]*x^2
getbase(p)
    ans = 
    1 1 5
    1 2 6
    1 3 7
    1 4 8