summaryrefslogtreecommitdiff
path: root/2048/CH6/EX6.9
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2048/CH6/EX6.9
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2048/CH6/EX6.9')
-rwxr-xr-x2048/CH6/EX6.9/pacf_ex.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/2048/CH6/EX6.9/pacf_ex.sce b/2048/CH6/EX6.9/pacf_ex.sce
new file mode 100755
index 000000000..6234614c2
--- /dev/null
+++ b/2048/CH6/EX6.9/pacf_ex.sce
@@ -0,0 +1,20 @@
+// Determination of order of AR(p) process, as discussed in Example 6.18 on page 189.
+// 6.9
+
+exec('pacf.sci',-1);
+exec('label.sci',-1);
+
+// Define model and generate data
+m = armac([1,-1,0.5],0,1,1,1,1);
+xi = 0.1*rand(1,10000,'normal');
+v = arsimul(m,xi);
+
+// Plot noise, plant output and PACF
+subplot(2,1,1), plot(v(1:500));
+label('',6,'','v',6);
+subplot(2,1,2), plot(xi(1:500));
+label('',6,'n','xi',6);
+xset('window',1)
+pacf(v,10);
+
+