Miroslav Hallo  Software
Uncertainty of Earth's crust model in waveformbased earthquake source inversions
 Open source functions for determining the (cross)covariance matrix of Green's functions by approximate covariance function (ACF, AXCF)
and stationarized approximate covariance function (SACF, SAXCF). The functions are distributed with an intuitive example, and return the full (cross)covariance matrices.
The codes are published under the GNU General Public License. To any licensee is given permission to modify the work, as well as to copy and redistribute the work or any derivative version.
Still we would like to kindly ask you to acknowledge the authors and don't remove their names from the code. The code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
Methodology following:
 Hallo, M., Gallovič, F. (2016). Fast and cheap approximation of Green functions uncertainty for waveformbased earthquake source inversions, Geophys. J. Int., 207, 10121029.

Here we dare to state some practical notes for users:
 Magnifying of the parameter L_{1} leads to magnifying the variance of the covariance matrix in both ACF and SACF.
 ACF covariance matrix is more accurate than SACF for L_{1}<T.
 ACF and SACF covariance matrices are very similar (in the duration of the useful signal) for L_{1}>T.
 The timeindependence of SACF produces nonzero variance even for zero signal (prior and after the duration of useful signal).
 Consider to use zero crosscovariance matrix (independence of two receivers), for receivers with higher mutual distance.
 The cosine taper is applied on final covariance matrix in the case of SAXCF, you can control the taper inside the saxcf.m function
Download
MATLAB (revision 1/2018):

 axcf.m  MatLab function for determining the (cross)covariance matrix by approximate covariance function (ACF, AXCF).
 saxcf.m  MatLab function for determining the (cross)covariance matrix by stationarized covariance function (SACF, SAXCF).
 example.m  Example of MatLab code using the functions axcf.m and saxcf.m
FORTRAN (revision 1/2018):

 approxc.f90  Fortran subroutines for determining the (cross)covariance matrix by (stationarized) approximate covariance function (AXCF, SAXCF).
Requirements
MATLAB:

The codes require MatLab functions: smooth from MatLab Curve Fitting Toolbox, and filtfilt from MatLab Signal Processing Toolbox.
The codes were tested on various versions of MatLab software, and it works without any problems even on older versions.
Namely we tested: Matlab 2010a 32bit (Windows XP), Matlab 2010b 64bit (Windows 7), Matlab 2012b 32bit (Windows 7),
Matlab 2012a 64bit (Ubuntu 14), Matlab 2014a 64bit (Ubuntu 14), Matlab 2015a 64bit (Ubuntu 14), Matlab 2017a 64bit (Windows 7).
FORTRAN:

The codes should fulfill Fortran 90 Standard. The codes were successfully compiled by GFortran (GCC) and ifort (Intel) compilers
on Ubuntu 14 operation system.