add test folder
[valse.git] / src / test / OLD_TEST_MATLAB / covariance.m
diff --git a/src/test/OLD_TEST_MATLAB/covariance.m b/src/test/OLD_TEST_MATLAB/covariance.m
new file mode 100644 (file)
index 0000000..839c33c
--- /dev/null
@@ -0,0 +1,9 @@
+%covariance matrix for tests on synthetic data: A(i,j) = a^|i-j|
+function[A] = covariance(p,a)
+
+       A = a*ones(p,p);
+       for i=1:p
+               A(i,:) = A(i,:) .^ abs(i-(1:p));
+       end
+
+end