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/CH9/EX9.5/9_5.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/CH9/EX9.5/9_5.sce')
-rw-r--r-- | 260/CH9/EX9.5/9_5.sce | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/260/CH9/EX9.5/9_5.sce b/260/CH9/EX9.5/9_5.sce new file mode 100644 index 000000000..94ca8b44e --- /dev/null +++ b/260/CH9/EX9.5/9_5.sce @@ -0,0 +1,35 @@ +//Eg-9.4
+//pg-396
+
+clc
+clear
+
+//from mclaurins series
+a=[0 1 0 -1/3 0 1/5 0 -1/7 0 1/9];
+
+
+//from R5,4x
+//subracting fx r45x and sloving for coefficients we end up with the matrices
+A=[1 0 -1.6667 0;0 1 0 -1.66667;-0.71429 0 1 0;0 -.71429 0 1];
+C=[0;0.71429;0;-.55556];
+
+B=inv(A)*C;
+//using these values we can compute values of a we represent set of a values using matrix P
+
+P(1)=0;
+P(2)=1;
+P(3)=B(1);
+P(4)=B(2)-1/3;
+P(5)=B(3)-B(1)/3;
+P(6)=B(4)-B(2)/3+1/5;
+
+T(1) = 1;
+for(i = 1:4)
+ T(i+1) = B(i);
+end
+
+j=poly(P,"x","coeff");
+k=poly(T,"x","coeff");
+
+disp("so required R5,4x is")
+disp(j/k)
\ No newline at end of file |