Hi.

I am trying to simulate two seismic traces $\displaystyle S^1 $ and $\displaystyle S^2 $ represented as two 1D vectors. I want the correlation between $\displaystyle S^1 $ and $\displaystyle S^2 $to be a constanti.e. 0.9 and In order to simulate these two trases I am wondering how to make this into a positive definite covariance matrix.

$\displaystyle S^1 $ and $\displaystyle S^2 $ is both spatially dependent, so I have introduced a gaussian correlation function and is on the form $\displaystyle \rho(x'-x'')=exp(-abs(x'-x'')^2/d)$

let $\displaystyle S^j=(s_1...s_n)$ for j=1,2

and I though I could create a covariance matrix B where

$\displaystyle \textbf{A}=\begin{bmatrix} \sigma_{s_1}^2 &\sigma_{s_1} \sigma_{s_2} \rho(x_1-x_2) &.. &.. & \sigma_{s_1} \sigma_{s_n} \rho(x_1-x_n)\\& & & & \\& &. & & \\& & &. & \\\sigma_{s_1} \sigma_{s_n} \rho(x_1-x_n)& & & & \sigma_{s_n}^2 \\\end{bmatrix}$

$\displaystyle \textbf{C}=\begin{bmatrix} 0.9*\sigma_{s_1}^2 & & & & \\& 0.9 \sigma_{s_2}^2& & & \\& &. & & \\& & &. & \\& & & &0.9\sigma_{s_n}^2 \\\end{bmatrix}$

$\displaystyle \textbf{B}=\begin{bmatrix} A & C \\ C & A \\\end{bmatrix}$

Why is this wrong? Why is this not positive definite?

I also tried with

$\displaystyle \textbf{B}=\begin{bmatrix} A & 0.9.*A^T \\ 0.9.*A & A \\\end{bmatrix}$

Which is indeed positive definite, but the simulation from this looks all wrong, and the second trace just got a super small variation around the mean compared to the first trace.

I think there is something wrong with my trail of thought here, any tip is appreciated.