hen <tt>wmean(A,weights,'dim',2)</tt> is a column vector containing the weighted mean of each row.</p><p><tt>M = wmean(...,'nanflag')</tt> specifies whether to include or omit <tt>NaN</tt> values from the calculation for any of the previous syntaxes. <tt>wmean(A,weights,'includenan')</tt> includes all <tt>NaN</tt> values in the calculation while <tt>wmean(A,weights,'omitnan')</tt> ignores them.</p><h2 id="3">Example 1: 1D array</h2><p>Here's an array of values <tt>y</tt> and their mean without any special w