global MAXF
global MINF

MINF = 10;
MAXF = 30;

%x_coords = [MINF:10:MAXF];
x_coords = [MINF:MAXF];
fitmesh = [];
MImesh = [];

%M = 3;
%cb = [MINF MINF; 0 0; MAXF MAXF];

M=5;
cb = [MINF MAXF; 0 0; MAXF MINF; MINF MINF; MAXF MAXF];

pr = UnEvenP(M,1/M);

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)];
  [MI,miDeriv] = miPois(cb,pr);
  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

