tt>NaN</tt>?</p><pre class="codeinput">A(2,2) = NaN

wmean(A,w)
</pre><pre class="codeoutput">A =
             0          1.00          2.00
          2.00           NaN          4.00
          4.00          5.00          6.00
          6.00          7.00          8.00
ans =
          2.00           NaN          4.00
</pre><p>We can ignore that missing entry instead of turning the whole solution for that column to <tt>NaN</tt>:</p><pre class="codeinput">wmean(A,w,<span class="string">'omitnan'</span>)
</pre