summaryrefslogtreecommitdiff
path: root/260/CH4/EX4.3/4_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '260/CH4/EX4.3/4_3.sce')
-rw-r--r--260/CH4/EX4.3/4_3.sce25
1 files changed, 25 insertions, 0 deletions
diff --git a/260/CH4/EX4.3/4_3.sce b/260/CH4/EX4.3/4_3.sce
new file mode 100644
index 000000000..d6ec28d2d
--- /dev/null
+++ b/260/CH4/EX4.3/4_3.sce
@@ -0,0 +1,25 @@
+//Eg-4.3
+//pg-145
+
+clear
+clc
+
+
+ A=[-3 0 1];
+ [r,c] = size(A);
+ n = r;
+
+ xl=1;
+ xu=3;
+ fx=poly(A,'x','c')
+
+ // using formula |xnew^n-alpha|<=xhigh-xlow/2^n
+
+ xhigh=3;
+ xlow=1;
+
+ t = 1+ (6*2.303/log(2));
+ disp(t)
+ printf('Analytically 2^(1-n)<10^(-6), solving that implies n > %f\n so n = %d',t,t+1)
+
+ \ No newline at end of file