summaryrefslogtreecommitdiff
path: root/260/CH12/EX12.5
diff options
context:
space:
mode:
Diffstat (limited to '260/CH12/EX12.5')
-rw-r--r--260/CH12/EX12.5/12_5.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/260/CH12/EX12.5/12_5.sce b/260/CH12/EX12.5/12_5.sce
new file mode 100644
index 000000000..061f330be
--- /dev/null
+++ b/260/CH12/EX12.5/12_5.sce
@@ -0,0 +1,15 @@
+//Eg-12.5
+//pg-515
+
+clear
+clc
+
+x = [0;0.5;1.2];
+T = [450;388;325];
+
+//The derivative can be computed using the equation [19]
+//Therefore the derivative at x = 1
+
+D = ((2-0.5-1.2)/((0-0.5)*(0-1.2)))*450 + ((2-0-1.2)/((0.5-0)*(0.5-1.2)))*388 + ((2-0-0.5)/((1.2-0)*(1.2-0.5)))*325;
+
+printf('The value of derivative at x = 1 is %f',D)