diff options
Diffstat (limited to '845/CH6/EX6.10/Ex6_10.sce')
-rwxr-xr-x | 845/CH6/EX6.10/Ex6_10.sce | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/845/CH6/EX6.10/Ex6_10.sce b/845/CH6/EX6.10/Ex6_10.sce new file mode 100755 index 000000000..44ebd653d --- /dev/null +++ b/845/CH6/EX6.10/Ex6_10.sce @@ -0,0 +1,25 @@ +//Example 6.10
+
+clc
+clear
+
+x = 1:5;
+Y = poly(0, "Y");
+y = [2 5 7 Y 32];
+
+n = length(x);
+del = %nan*ones(n,5);
+del(:,1) = y';
+for j = 2:5
+ for i = 1:n-j+1
+ del(i,j) = del(i+1,j-1) - del(i,j-1);
+ end
+end
+del(:,1) = [];
+
+// del4 = 0
+
+y0 = del(:,4);
+y0(isnan(y0)) = [];
+Y = roots(y0)
+disp(Y,"Missing value f(x3) = ")
|