summaryrefslogtreecommitdiff
path: root/83/CH14/EX14.1
diff options
context:
space:
mode:
Diffstat (limited to '83/CH14/EX14.1')
-rwxr-xr-x83/CH14/EX14.1/example_14_1.sce13
-rwxr-xr-x83/CH14/EX14.1/result_example_14_1.txt7
2 files changed, 20 insertions, 0 deletions
diff --git a/83/CH14/EX14.1/example_14_1.sce b/83/CH14/EX14.1/example_14_1.sce
new file mode 100755
index 000000000..e392b99f3
--- /dev/null
+++ b/83/CH14/EX14.1/example_14_1.sce
@@ -0,0 +1,13 @@
+//Chapter 14
+//Example 14.1
+//page 533
+//To estimate the values of the random variables x1 and x2
+clear;clc;
+
+H=[1 0;0 1;1 1]; //given matrix
+k=inv(H'*H)*H'; // from eq 14.9
+y=['y1';'y2';'y3'];
+k=string(k);
+x=[k(1,1)+y(1,1)+k(1,2)+y(2,1)+"+"+k(1,3)+y(3,1) ;k(2,1)+y(1,1)+"+"+k(2,2)+y(2,1)+"+"+k(2,3)+y(3,1)];
+printf('Estimate of x =\n');
+disp(x); \ No newline at end of file
diff --git a/83/CH14/EX14.1/result_example_14_1.txt b/83/CH14/EX14.1/result_example_14_1.txt
new file mode 100755
index 000000000..8e301aa45
--- /dev/null
+++ b/83/CH14/EX14.1/result_example_14_1.txt
@@ -0,0 +1,7 @@
+
+Estimate of x =
+
+!0.6666667y1-0.3333333y2+0.3333333y3 !
+! !
+!-0.3333333y1+0.6666667y2+0.3333333y3 !
+