same answer as <tt>mean(A,2)</tt>.</p><p><b>Question:</b> How could we make the weighted mean of <tt>A</tt> turn out to be equal to the second row of <tt>A</tt>?</p><p><b>Answer:</b> I can think of two ways. One way is to set all the weights to zero, except row 2. Alternatively, we could keep those rows the way they are, and instead set the second row of weights to some insanely large number:</p><pre class="codeinput">w(2,:) = 1e100

wmean(A,w)
</pre><pre class="codeoutput">w =
          1.00          1.00 