From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 260/CH14/EX14.6/14_6.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 260/CH14/EX14.6/14_6.sce (limited to '260/CH14/EX14.6') 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 -- cgit