Discrete approximation to Gaussian filter
The difference between the two should be slight but the MATLAB one has the property that it preserves the signal energy content. That is a property that you expect to have when using a Gaussian filter.