OLD_MATLAB_CODE not required anymore
[valse.git] / src / test / generate_test_data / MATLAB_test_helpers / covariance.m
CommitLineData
7b272073
BA
1%covariance matrix for tests on synthetic data: A(i,j) = a^|i-j|
2function[A] = covariance(p,a)
3
4 A = a*ones(p,p);
5 for i=1:p
6 A(i,:) = A(i,:) .^ abs(i-(1:p));
7 end
8
9end