summaryrefslogtreecommitdiff
path: root/3588/CH6/EX6.1/EX6_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3588/CH6/EX6.1/EX6_1.sce')
-rw-r--r--3588/CH6/EX6.1/EX6_1.sce28
1 files changed, 28 insertions, 0 deletions
diff --git a/3588/CH6/EX6.1/EX6_1.sce b/3588/CH6/EX6.1/EX6_1.sce
new file mode 100644
index 000000000..d133990b2
--- /dev/null
+++ b/3588/CH6/EX6.1/EX6_1.sce
@@ -0,0 +1,28 @@
+//Clearing console
+clc
+clear
+
+s = poly(0,"s")
+
+//Calculating Constants in interpolation functions
+c1 = 1/((-1/3)*(-2/3)*(-1))
+c2 = 1/((1/3)*(-1/3)*(-2/3))
+c3 = 1/((2/3)*(1/3)*(-1/3))
+c4 = 1/((1)*(2/3)*(1/3))
+
+//interpolation functions
+N1 = c1*(s-1/3)*(s-2/3)*(s-1)
+N2 = c2*(s)*(s-2/3)*(s-1)
+N3 = c3*(s)*(s-1/3)*(s-1)
+N4 = c4*(s)*(s-1/3)*(s-2/3)
+
+//Printing Results
+printf('\nInterpolation Functions\n')
+printf('N1(x) =')
+disp(N1)
+printf('N2(x) =')
+disp(N2)
+printf('N3(x) =')
+disp(N3)
+printf('N4(x) =')
+disp(N4)