i am trying to filter a data set in matrix format using gaussian filter.i take the fourier transform of the data and then multiply with gaussian filter and take the inverse fourier transform of that. Now here is the function i have written(matlab) for gaussian filter design but seems to be not exactly producing correct result. could anyone check the problem in the function below plz.

function g = gauss_des(x,pos,wid)

g = 1/(wid*sqrt(2*pi)) * exp(-.5*((x-pos)/wid).^2)

where pos = centre
width = width of filter
x = digital frequency range of the filter ; for example i have used x =0:.001:.5

Thanks in advance