ag')</pre><h2 id="2">Description</h2><p><tt>M = wmean(A,weights)</tt> returns the weighted mean of the elements of <tt>A</tt> along the first array dimension whose size does not equal 1. Dimensions of <tt>A</tt> must match the dimensions of <tt>weights</tt>.</p><div><ul><li>If <tt>A</tt> is a vector, then <tt>wmean(A,weights)</tt> returns the weighted mean of the elements.</li><li>If <tt>A</tt> is a matrix, then <tt>wmean(A,weights)</tt> returns a row vector containing the weighted mean of each column.</li>