title: Matlab Matrix multiplication ignoring nans?
body: <p>I have two matrices <code>A</code> and <code>B</code> which I want to multiply, but they contain <code>nan</code>s. </p>
  
  <p>The default multiply puts <code>nan</code> down the whole column of the result where there was even a single <code>nan</code> in the data. I want to ignore them, like <code>nansum</code>/<code>nanmean</code> etc do. In other words, instead of computing</p>
  
  <pre><code> sum( A(i,j) * B(j,k) )
  </code></pre>
  
  <p>I want it to use <code>nansum</code>.</p>
  
  <p>I suppose this is possible by replacing <code>nan</code> with <code>0</code>, and then multiplying, but the point of having <code>nansum</code> is to obviate that, right?</p>