blob: 061f330bea7fab7024d4e86be02b9699f4ef99e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
|