title: [a b]=cholcov function returns a=[] and b=NaN for a symmetric positive definite matrix
body: <p>I have this matrix:</p>
  
  <pre><code>S=   6.84370358358718e-006    -7.45833473076585e-007
      -7.45833473076565e-007     7.11723106043725e-006
  </code></pre>
  
  <p>It is symmetric:</p>
  
  <pre><code>S-S'=                     0    -2.00111533788828e-020
        2.00111533788828e-020                         0 
  </code></pre>
  
  <p>and is positive definite:</p>
  
  <pre><code>eig(S)= 6.22219831321029e-006    and     7.73873633081414e-006
  </code></pre>
  
  <p>When I use <code>[a b]=cholcov(S)</code>, it returns returns <code>a=[]</code> and <code>b=NaN</code>. It is written in MatLab help that<code>[T,num] = cholcov(SIGMA)</code> ... <code>If SIGMA is not square and symmetric, num is NaN and T is empty.</code></p>
  
  <p>Of course the <code>chol(S)</code> function decomposes this function without any error. I  don't know the difference between <code>chol</code> and <code>cholcov</code> and it is not important, since I don't have any choices. The error comes from <code>mvnrnd(zeros(1,2),S)</code> function, when I try to generate some random numbers:</p>
  
  <p><code>??? Error using ==&gt; mvnrnd at 118<br>
  SIGMA must be a symmetric positive semi-definite matrix.</code></p>
  
  <p>Can anyone tell me what's wrong here?
  thanks.</p>