k      - [] length [n] vector of weights

 OUTPUTS
  h           - nd histogram [nBins^nd]

 EXAMPLE - 1D histograms
  A=filterGauss([1000 1000],[],[],0); A=A(:); n=length(A);
  h1 = histc2( A, 25 );              figure(1); bar(h1);
  h2 = histc2( A, 25, ones(n,1) );   figure(2); bar(h2);
  h3 = histc2( A, 25, A );           figure(3); bar(h3);

 EXAMPLE - 2D histograms
  A=filterGauss([1000 1000],[],[],0); A=A(:); n=length(A);
  h=histc2( [A A], 25 );    figure(1); im(h);  % decreasing along d