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

%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(j,i);
    end
    if A(j,i) == 0
      B(j,i) = A(i,j);
    end
  end
end

