

global MAXF
global MINF
MINF = 10;
MAXF = 100;

x_coords = [MINF:5:MAXF];
fitmesh = [];
MImesh = [];

cb = [MINF MAXF; (MAXF-MINF)*rand(1,2) + MINF;MAXF MINF];
cb = (MAXF-MINF)*rand(5,3) + MINF;
cb = [MINF MAXF; 0 0; MAXF MINF; MINF MINF; MAXF MAXF];

M = size(cb, 1); % number of symbols
N = size(cb, 2); % number of neurons
pr = UnEvenP(M, 1/M);

numSamples = 100;

for i = 1:size(x_coords,2)             %loop over x coordinates
  for j = 1:size(x_coords,2)           %loop over y coordinates
  %j=i;                                 % only probe on diagonal
  cb(2,:) = [x_coords(i) x_coords(j)];
  rSamples = genSamples(cb,pr,numSamples);
  [MI, miDeriv] = miPoisSamp(cb,pr,rSamples);
  MImesh(i,j) = MI;
  %fprintf('(%d,%d)  ',x_coords(i),x_coords(j));
  %fprintf('[%.3f]\n',MI);
  end
end;

clf;
contourf(x_coords,x_coords,MImesh);
set(gca, 'plotboxaspectratio',[1 1 1]);
colorbar





