Create a function based on a simulation

Something like this will only work if “sig_gaus” is the same function that was used to get “r1” (full “c1” should be used).
Otherwise, you need to create a (square!) “c1g” covariance matrix with elements appropriate for the “sig_gaus” function (i.e., for all its parameters).

See also: