function z=qform(A,u), z=u'*A*u;
% qform - Quadratic form: qform(A,x)=x'*A*x
%
% qform :: [[N,N]], [[N,T]] -> [[T,T]].
