	function Ic = makeFilt(n,s,I,theta);


	for i=1:n
		x(i) = i - n/2;
 		for k=1:n
			y(k) = k-n/2;
		end
	end

	th =theta*pi/180.0;
	R = [cos(th) -sin(th); sin(th) cos(th)];
	for i=1:n
 		for k=1:n
			vec = R*([x(i) y(k)]');
			F(i,k) = exp((-1/(2*s^2))*(4*vec(1)^2 + vec(2)^2))*exp(-j*2*pi*vec(1)/s);	 
 		end
	end
	Fr = real(F);
	Fi = imag(F);
   
	subplot(2,2,2);
	imagesc(Fr);
	axis('image');
	str = sprintf('Filter angle %3.0f',theta);
	title(str);
   
   
	temp = (conv2(I,Fr));
	m = size(temp);
	Ic = temp(n:m(1)-n,n:m(2)-n);
	subplot(2,2,3);
	imagesc(Ic);
	axis('image');
	title('Filtered Image');

