MATLAB Application of Correlation Functions