function X = order_dict(W)
% X = order_dict(W)
%    W is a dictionary of NMF columns.
%    Return X as an ordering of them that tries to sort
%    by fundamental frequency, so that imagesc(W(:,X)) 
%    looks well structured.
% 2013-04-29 Dan Ellis

% Right now, just assume that largest bin corresponds to fundamental
[vv, xx] = max(W);  % xx holds largest row in each column
[vvv, X] = sort(xx); % X orders columns of W by index of largest bin