summaryrefslogtreecommitdiff
path: root/2048/DEPENDENCIES/pacf_mat.sci
diff options
context:
space:
mode:
Diffstat (limited to '2048/DEPENDENCIES/pacf_mat.sci')
-rw-r--r--2048/DEPENDENCIES/pacf_mat.sci44
1 files changed, 44 insertions, 0 deletions
diff --git a/2048/DEPENDENCIES/pacf_mat.sci b/2048/DEPENDENCIES/pacf_mat.sci
new file mode 100644
index 000000000..ba250b63f
--- /dev/null
+++ b/2048/DEPENDENCIES/pacf_mat.sci
@@ -0,0 +1,44 @@
+// Construction of square matrix required to compute PACF ajj, useful for the calculations in Sec. 6.4.5.
+// 6.11
+
+function ajj = pacf_mat(rvv0,rvv_rest,p,k)
+if argn(2) == 3,
+ k = 1;
+end
+for i = 1:p
+ for j = 1:p
+ index = (k+i-1)-j;
+ if index == 0,
+ A(i,j) = rvv0;
+ elseif index < 0,
+ A(i,j) = rvv_rest(-index);
+ else
+ A(i,j) = rvv_rest(index);
+ end
+ end
+ b(i) = -rvv_rest(k+i-1);
+end
+a = A\b;
+ajj = a(p);
+endfunction;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+