<li>If <tt>A</tt> is a multidimensional array, then <tt>wmean(A,weights)</tt> operates along the first array dimension whose size does not equal 1, treating the elements as vectors. This dimension becomes 1 while the sizes of all other dimensions remain the same.</li></ul></div><p><tt>M = wmean(...,'all')</tt> computes the weighted mean over all elements. (Requires Matlab R2018b or later.)</p><p><tt>M = wmean(...,'dim',dim)</tt> returns the mean along dimension dim. For example, if <tt>A</tt> is a matrix, t