diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /260/CH14/EX14.6/14_6.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '260/CH14/EX14.6/14_6.sce')
-rw-r--r-- | 260/CH14/EX14.6/14_6.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/260/CH14/EX14.6/14_6.sce b/260/CH14/EX14.6/14_6.sce new file mode 100644 index 000000000..5483e4bf1 --- /dev/null +++ b/260/CH14/EX14.6/14_6.sce @@ -0,0 +1,27 @@ +//Eg-14.6
+//pg-590
+
+clear
+clc
+close()
+
+a = [6 -6 1];
+exec graeffe.sci
+q = graeffe(a,10^-6);
+
+x0 = 0;
+x1 = q(2);
+x2 = q(1);
+x3 = 1;
+
+P = [1 x0 x0^2 x0^3;1 x1 x1^2 x1^3;1 x2 x2^2 x2^3;1 x3 x3^2 x3^3];
+Q = [0 1 2*x0 3*x0^2;0 1 2*x1 3*x1^2;0 1 2*x2 3*x2^2;0 1 2*x3 3*x3^2];
+R = [0 0 2 6*x0;0 0 2 6*x1;0 0 2 6*x2;0 0 2 6*x3];
+
+A = Q*inv(P);
+B = R*inv(P);
+
+printf('\nThe matrix A is \n')
+disp(A)
+printf('The matrix B is \n')
+disp(B)
\ No newline at end of file |