summaryrefslogtreecommitdiff
path: root/1055/CH23/EX23.3
diff options
context:
space:
mode:
Diffstat (limited to '1055/CH23/EX23.3')
-rwxr-xr-x1055/CH23/EX23.3/ch23_3.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1055/CH23/EX23.3/ch23_3.sce b/1055/CH23/EX23.3/ch23_3.sce
new file mode 100755
index 000000000..de131b163
--- /dev/null
+++ b/1055/CH23/EX23.3/ch23_3.sce
@@ -0,0 +1,14 @@
+//Problem on State Estimator Linear Model
+
+clear
+clc;
+A=[-3.33 0;0 10;5 -5];
+R=[10^-4 0 0;0 10^-4 0;0 0 10^-4];
+O=inv(((A')*(inv(R))*(A)))*((A')*(inv(R))*[.12;.21;-.30]);//assuming theat matrix=0
+f12=-3.33*(O(1,1));
+f31=10*(O(2,1));
+f23=5*(O(1,1)-O(2,1));
+J=(((.12-f12)^2)+((.21-f31)^2)+((-.3-f23)^2))/(10^-4);
+disp(O,"O=");//Answer does not match due to difference in rounding off of digits
+disp(J,"J=");//Answer does not match due to difference in rounding off of digits
+