function z=qforma(A,u), z=sum(u.*(A*u));
% qforma - Quadratic form (array version) qforma(A,x)=diag(x'*A*x)
%
% qforma :: [[N,N]], [[N,T]] -> [[1,T]].
