15.6.2 Transforming a matrix into a quadratic form
The a2q
command finds the quadratic form corresponding to a symmetric matrix.
-
a2q takes two arguments:
-
A, a symmetric matrix of a quadratic form.
- vars, a vector of variable names whose size is the
same as the number of rows of A.
- a2q(A,vars) returns the symbolic
expression for the quadratic form.
Examples