# # function s=ssq(Z) # # Compute the sum of squares of a matrix # function s=ssq(Z) s=sum(sum(Z.*Z)); endfunction