%Write a Matlab script code to generate the unshap filter with out using 
%the h = fspecial('unsharp'), accomplish this using the steps required 
%to building the unsharp flters 
f = imread('moon.tif');
f = im2double(f);
h = fspecial('gaussian',[5 5],0.5);
fs = imfilter(f,h,'replicate');
fmask = f-fs;
g = f+fmask;
subplot(2,2,1);
imshow(f,[]);
subplot(2,2,2);
imshow(fs,[]);
subplot(2,2,3);
imshow(fmask,[]);
subplot(2,2,4);
imshow(g,[]);