hich the values close to zero are to be weighted most heavily, like this:</p><pre class="codeinput">weight = logspace(1,0,6)

wmean(y,weight)
</pre><pre class="codeoutput">weight =
  Columns 1 through 5
         10.00          6.31          3.98          2.51          1.58
  Column 6
          1.00
ans =
          2.61
</pre><h2 id="6">Example 2: 2D matrix</h2><p>Here's a 2D matrix <tt>A</tt>, and just like in Example 1 we'll start by using equal weights across the board:</p><pre class="codeinput"><span cla