function B = mk_symmetric(A)
% MK_SYMMETRIC Make a matrix symmetric by ignoring the 0 entries.
% B = mk_symmetric(A)

%B=triu(A) + triu(A,1)'; % extracts upper triangular 

n = length(A);
B = zeros(n);
for i=1:n
  for j=1:n
    if A(i,j) ~= 0
      B(i,j) = A(i,j);
    end
  end
end

