Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (27 sloc) 586 Bytes
function v=trilos(m)
% v=trilos(m)
%
% Slims down a symmetric (e.g. covariance, Fisher or Hessian) matrix by
% first going down the diagonal and then across the remaining columns
% down the rows.
%
% INPUT:
%
% m A full-form symmetric matrix
%
% OUTPUT:
%
% v The elements that matter, in a column vector
%
% SEE ALSO:
%
% TRILOSI, NCHOOSEK
%
% Last modified by fjsimons-at-alum.mit.edu, 06/20/2018
% Do'nt check symmetry as we will "fake-use" TRILOS for TRILOSI
% difer(m-m',[],[],NaN)
% Reorganize
dm=diag(m);
m=tril(m)-diag(dm);
% Linearly unwrap it
v=[dm ; m(~~m)];
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.