hess(mat, details)

Implements Hessian decomposition.

matThe matrix to be decomposed. It needs to be a square matrix.
detailsIf H is to be calculated and returned. (Defaults to false, otherwise the return type is structure.)
return valueThe Hessian matrix H, or the structure {h:H, q:Q}, depending on the parameter 'details'.

Square matrix A is decomposed into QH, where Q is unitary H is zero below the subdiagonal.

A = [3,4,5+2i,6;7-1i,-8+7i,9,8;7,6,5,4;3,2,1,2] * 1J; s = ejs.hess(A,1) s.q * s.q' s.q * s.h * s.q'