rself that the answer
% above, in which all weights are equal, gives the same answer as |mean(A,2)|. 
%% 
% *Question:* How could we make the weighted mean of |A| turn out to be equal to 
% the second row of |A|? 
% 
% *Answer:* 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: 

w(2,:) = 1e100

wmean(A,w)

%% 
% What if one element in |A| i