x^T P x.

quadform(x, P)

Arguments

x

input vector, either x or P must be constant.

P

input matrix, either x or P must be constant, P needs to be semidefinte if x is not constant.