% Description:
%
%       Gaussian.m computes the Gaussian
%       
% Input:
%
%       d - side of a block
%       j - block in the j-th row
%       k - block in the k-th column
%       x - row (ranges only in block 1,1)
%       y - column (ranges only in block 1,1)
%       sigma - width of the Gaussian
%
% Output:
%
%       G - value of the Gaussian
%

function [G] = Gaussian(d,j,k,x,y,sigma)

xjk = d*(j-1)+0.5*(d+1);
yjk = d*(k-1)+0.5*(d+1);

G = exp(-((x-xjk)^2+(y-yjk)^2)/(2*sigma^2));