%DIP Class Demo
%Shreekanth Mandayam, Rowan University
P=5;K=10;bh=5;bv=5;
clear h;
center=ceil(P/2);
for i=1:P;
 for j=1:P;
  i1=i-center;
  j1=j-center;
  h(i,j)=K*exp(-(0.5*i1^2/bh^2 + 0.5*j1^2/bh^2));
end;
end;

figure(2);
clf;imshow(mat2gray(h),'InitialMagnification','fit');
title('h(x,y): 5x5 Gaussian');
