function A = genspdm(n)
%GENSPDM Generate a dense n x n symmetric, positive definite matrix

  A = rand(n, n); % generate a random n x n matrix
  A = 0.5*(A + A'); % construct a symmetric matrix

  % |A(i,j)| < 1 by construction, thus A + nI is a symmetric diagonally 
  % dominant matrix; it is also symmetric positive definite
  A = A + n*eye(n);
end
