Difference between revisions of "Scilab/C4/Interpolation/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| Border=1 || Time || Narration |- | 00.01 |Dear Friends, |- | 00.02 | Welcome to the Spoken Tutorial on '''“Numerical Interpolation” ''' |- | 00.06 | At the end of th…')
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{| Border=1
 
{| Border=1
  
|| Time
+
|'''Time'''
 
+
|'''Narration'''
|| Narration
+
 
+
|-
+
| 00.01
+
|Dear Friends,
+
  
 
|-
 
|-
| 00.02
+
| 00:01
| Welcome to the Spoken Tutorial on '''“Numerical Interpolation” '''
+
|Dear Friends, Welcome to the Spoken Tutorial on '''Numerical Interpolation'''.
  
 
|-
 
|-
| 00.06
+
| 00:06
 
| At the end of this tutorial, you will learn how to:   
 
| At the end of this tutorial, you will learn how to:   
  
 
|-
 
|-
|00.10
+
|00:10
 
|Develop '''Scilab code''' for different '''Numerical Interpolation algorithms'''
 
|Develop '''Scilab code''' for different '''Numerical Interpolation algorithms'''
  
 
|-
 
|-
|00.16
+
|00:16
|Calculate new value of '''function''' from given '''data points'''
+
|Calculate new value of '''function''' from given '''data points'''.
  
 
|-
 
|-
| 00.21
+
| 00:21
 
|To record this tutorial, I am using  
 
|To record this tutorial, I am using  
  
 
|-
 
|-
|00.24
+
|00:24
 
|'''Ubuntu 12.04''' as the operating system  
 
|'''Ubuntu 12.04''' as the operating system  
 
  
 
|-
 
|-
| 00.27
+
| 00:27
|and '''Scilab 5.3.3''' version  
+
|and '''Scilab 5.3.3''' version.
  
 
|-
 
|-
| 00.31
+
| 00:31
| To practise this tutorial, a learner should have  
+
| To practice this tutorial, a learner should have  
  
 
|-
 
|-
|00.34
+
|00:34
 
|basic knowledge of '''Scilab'''  
 
|basic knowledge of '''Scilab'''  
  
 
|-
 
|-
|00.36
+
|00:36
|and should know '''Numerical Interpolation'''
+
|and should know '''Numerical Interpolation'''.
  
 
|-
 
|-
| 00.40
+
| 00:40
| To learn '''Scilab,''' please refer to the relevant tutorials available on the '''Spoken Tutorial''' website.  '''Spoken Tutorial''' website.
+
| To learn '''Scilab,''' please refer to the relevant tutorials available on the '''Spoken Tutorial''' website.   
 
+
 
|-
 
|-
| 00.47
+
| 00:47
 
| '''Numerical interpolation''' is a method of  
 
| '''Numerical interpolation''' is a method of  
  
 
|-
 
|-
|00.51
+
|00:51
 
|constructing new '''data points'''
 
|constructing new '''data points'''
  
 
|-
 
|-
|00.53
+
|00:53
 
| within the range of a  '''discrete set''' of known '''data points.'''  
 
| within the range of a  '''discrete set''' of known '''data points.'''  
  
 
|-
 
|-
  
|00.59
+
|00:59
  
 
|We can solve '''interpolation''' problems using '''numerical methods.'''  
 
|We can solve '''interpolation''' problems using '''numerical methods.'''  
Line 74: Line 67:
 
|-
 
|-
  
|01.05
+
|01:05
  
 
|In '''Lagrange interpolation,'''  
 
|In '''Lagrange interpolation,'''  
Line 80: Line 73:
 
|-
 
|-
  
| 01.07
+
| 01:07
  
 
|We pass a '''polynomial''' of '''degree N – 1''' through '''N''' points.  
 
|We pass a '''polynomial''' of '''degree N – 1''' through '''N''' points.  
Line 86: Line 79:
 
|-
 
|-
  
| 01.12
+
| 01:12
||Then, we find the unique '''N order polynomial y of x'''which '''interpolates''' the '''data''' samples.  
+
||Then, we find the unique '''N order polynomial y of x''' which '''interpolates''' the '''data''' samples.  
 
+
  
 
|-
 
|-
  
|01.22
+
|01:22
  
 
|| We are given the '''natural logarithm'''  values for nine, nine point five and eleven.  
 
|| We are given the '''natural logarithm'''  values for nine, nine point five and eleven.  
 
 
  
 
|-
 
|-
  
|01.29
+
|01:29
  
 
| We have to find the value of '''natural logarithm''' of nine point two.   
 
| We have to find the value of '''natural logarithm''' of nine point two.   
 
  
 
|-
 
|-
|01.35
+
|01:35
 
|Let us solve this problem using '''Lagrange interpolation method.'''
 
|Let us solve this problem using '''Lagrange interpolation method.'''
  
 
 
|-
 
|-
  
|01.41
+
|01:41
  
 
|Let us look at the code for  '''Lagrange interpolation.'''
 
|Let us look at the code for  '''Lagrange interpolation.'''
Line 118: Line 106:
 
|-
 
|-
  
|01.46
+
|01:46
  
 
||We define the function '''Lagrange''' with '''arguments x zero, x, f and n.'''  
 
||We define the function '''Lagrange''' with '''arguments x zero, x, f and n.'''  
  
 
|-
 
|-
|01.53
+
|01:53
 
|'''X zero''' is the unknown '''interpolation point.'''  
 
|'''X zero''' is the unknown '''interpolation point.'''  
 
 
  
 
|-
 
|-
| 01.57
+
| 01:57
 
|'''x''' is the '''vector''' containing the '''data points.'''  
 
|'''x''' is the '''vector''' containing the '''data points.'''  
 
 
  
 
|-
 
|-
  
| 02.01
+
| 02:01
|'''f''' is the '''vector''' containing the values of the '''function''' at correspoding '''data points.'''  
+
|'''f''' is the '''vector''' containing the values of the '''function''' at corresponding '''data points.'''  
 
+
  
 
|-
 
|-
  
|02.08
+
|02:08
  
 
||And '''n''' is the '''order''' of the '''interpolating polynomial.'''  
 
||And '''n''' is the '''order''' of the '''interpolating polynomial.'''  
 
|-
 
|-
  
|02.14
+
|02:14
 
+
  
 
| We use '''n''' to initialize '''m''' and '''vector N.'''
 
| We use '''n''' to initialize '''m''' and '''vector N.'''
Line 154: Line 136:
 
|-
 
|-
  
|02.19
+
|02:19
  
 
| The order of the '''interpolating polynomial''' determines the number of '''nodes''' created.  
 
| The order of the '''interpolating polynomial''' determines the number of '''nodes''' created.  
Line 160: Line 142:
 
|-
 
|-
  
| 02.25
+
| 02:25
  
 
|| Then, we apply '''Lagrange interpolation formula'''  
 
|| Then, we apply '''Lagrange interpolation formula'''  
 
  
 
|-
 
|-
| 02.29
+
| 02:29
 
| to find the value of the '''numerator''' and '''denominator.'''
 
| to find the value of the '''numerator''' and '''denominator.'''
  
 
|-
 
|-
|02.35
+
|02:35
 
| Then we divide the '''numerator''' and '''denominator''' to get the value of '''L.'''  
 
| Then we divide the '''numerator''' and '''denominator''' to get the value of '''L.'''  
  
 
|-
 
|-
|02.41
+
|02:41
 
| We use '''L''' to find the value of the function '''y''' at the given data point.  
 
| We use '''L''' to find the value of the function '''y''' at the given data point.  
  
 
|-
 
|-
| 02.48
+
| 02:48
| Finally we display the value of '''L''' and '''f of x.'''
+
| Finally we display the value of '''L''' and '''f of x''' f(x).
 
   
 
   
 
 
|-
 
|-
| 02.53
+
| 02:53
|Let us save and execute the file
+
|Let us '''Save and execute''' the file.
 
+
 
+
  
 
|-
 
|-
| 02.57
+
| 02:57
 
|Switch to '''Scilab console''' to solve the example problem.  
 
|Switch to '''Scilab console''' to solve the example problem.  
 
  
 
|-
 
|-
| 03.02
+
| 03:02
 
|Let us define the '''data points vector.'''  
 
|Let us define the '''data points vector.'''  
  
 
|-
 
|-
|03.05
+
|03:05
| On the '''console''' type,  
+
| On the '''console''', type:
  
 
|-
 
|-
| 03.07
+
| 03:07
 
|''' x equal to open square bracket nine point zero comma nine point five comma eleven point zero close square bracket.'''
 
|''' x equal to open square bracket nine point zero comma nine point five comma eleven point zero close square bracket.'''
  
 
|-
 
|-
  
| 03.18
+
| 03:18
 
+
|Press '''Enter'''
+
 
+
  
 +
|Press '''Enter'''.
  
 
|-
 
|-
  
| 03.21
+
| 03:21
||Then type '''f equal to open square bracket two point one nine seven two comma two point two five one three comma two point three nine seven nine close square bracket'''  
+
||Then type: '''f equal to open square bracket two point one nine seven two comma two point two five one three comma two point three nine seven nine close square bracket'''  
 
+
 
+
  
 
|-
 
|-
  
|03.39
+
|03:39
 
+
||Press '''Enter '''
+
  
 +
||Press '''Enter '''.
  
 
|-
 
|-
  
| 03.41
+
| 03:41
 
| Then type '''x zero equal to nine point two'''  
 
| Then type '''x zero equal to nine point two'''  
 
 
  
 
|-
 
|-
  
| 03.46
+
| 03:46
 
+
| Press '''Enter'''
+
  
 +
| Press '''Enter'''.
  
 
|-
 
|-
  
| 03.48
+
| 03:48
  
 
| Let us use a '''quadratic polynomial interpolating polynomial.'''  
 
| Let us use a '''quadratic polynomial interpolating polynomial.'''  
 
  
 
|-
 
|-
  
|03.53
+
|03:53
 
+
||Type '''n equal to two'''
+
  
 +
||Type '''n equal to two'''.
  
 
|-
 
|-
  
|03.58
+
|03:58
 
+
|Press '''Enter'''
+
  
 +
|Press '''Enter'''.
  
 
|-
 
|-
  
| 04.00
+
| 04:00
 
+
| To call the '''function,''' type
+
 
+
 
+
  
 +
| To call the '''function,''' type:
  
 
|-
 
|-
  
| 04.02
+
| 04:02
 
+
|'''y equal to Lagrange open paranthesis x zero comma x comma f comma n close paranthesis'''
+
 
+
  
 +
|'''y equal to Lagrange open parenthesis x zero comma x comma f comma n close parenthesis'''
  
 
|-
 
|-
  
| 04.14
+
| 04:14
  
 
| Press '''Enter. '''
 
| Press '''Enter. '''
Line 287: Line 248:
 
|-
 
|-
  
| 04.16
+
| 04:16
  
 
| The value of the function '''y at x equal to nine point two''' is displayed.  
 
| The value of the function '''y at x equal to nine point two''' is displayed.  
Line 293: Line 254:
 
|-
 
|-
  
| 04.22
+
| 04:22
  
 
||Let us look at '''Newton's Divided Difference Method.'''  
 
||Let us look at '''Newton's Divided Difference Method.'''  
 
  
 
|-
 
|-
  
| 04.26
+
| 04:26
  
 
||In this method, '''Divided Differences recursive method''' is used.  
 
||In this method, '''Divided Differences recursive method''' is used.  
Line 306: Line 266:
 
|-
 
|-
  
| 04.32
+
| 04:32
  
 
||It uses lesser number of '''computation''' than '''Lagrange method.'''  
 
||It uses lesser number of '''computation''' than '''Lagrange method.'''  
Line 312: Line 272:
 
|-
 
|-
  
| 04.38
+
| 04:38
  
 
|In spite of this, the same '''interpolating polynomial,''' as in '''Lagrange method,''' is generated.  
 
|In spite of this, the same '''interpolating polynomial,''' as in '''Lagrange method,''' is generated.  
 
 
  
 
|-
 
|-
  
| 04.47
+
| 04:47
  
 
|Let us solve this example using '''Divided Difference method.'''  
 
|Let us solve this example using '''Divided Difference method.'''  
 
  
 
|-
 
|-
  
|04.52
+
|04:52
  
 
|We are given  the '''data points''' and  
 
|We are given  the '''data points''' and  
 
 
  
 
|-
 
|-
  
| 04.54
+
| 04:54
  
 
| the corresponding values of the '''function''' at those '''data points.'''  
 
| the corresponding values of the '''function''' at those '''data points.'''  
 
 
 
  
 
|-
 
|-
  
| 05.00
+
| 05:00
  
 
| We have to find the value of the '''function''' at '''x equal to three.'''  
 
| We have to find the value of the '''function''' at '''x equal to three.'''  
Line 350: Line 302:
 
|-
 
|-
  
| 05.05
+
| 05:05
  
 
| Let us look at the code for '''Newton Divided Difference method. '''
 
| Let us look at the code for '''Newton Divided Difference method. '''
Line 356: Line 308:
 
|-
 
|-
  
| 05.11
+
| 05:11
  
 
|Open the file '''Newton underscore Divided dot sci''' on '''Scilab Editor.'''
 
|Open the file '''Newton underscore Divided dot sci''' on '''Scilab Editor.'''
 
  
 
|-
 
|-
  
| 05.18
+
| 05:18
  
 
|We define the '''function Newton underscore Divided''' with '''arguments x, f''' and '''x zero.'''  
 
|We define the '''function Newton underscore Divided''' with '''arguments x, f''' and '''x zero.'''  
 
  
 
|-
 
|-
  
| 05.29
+
| 05:29
  
 
| '''x''' is a '''vector''' containing the '''data points,'''  
 
| '''x''' is a '''vector''' containing the '''data points,'''  
 
  
 
|-
 
|-
  
| 05.33
+
| 05:33
  
 
|'''f''' is the corresponding '''function value''' and  
 
|'''f''' is the corresponding '''function value''' and  
 
 
  
 
|-
 
|-
| 05.36
+
| 05:36
 
| '''x zero''' is the unknown '''interpolation point.'''  
 
| '''x zero''' is the unknown '''interpolation point.'''  
  
 
|-
 
|-
| 05.41
+
| 05:41
|We find the length of '''vector''' and then equate it to '''n.'''
+
|We find the '''length''' of '''vector''' and then equate it to '''n.'''
 
|-
 
|-
  
| 05.46
+
| 05:46
  
| The first value of '''vector''' is equated to '''a of one.'''
+
| The first value of '''vector''' is equated to '''a of one''' a(1).
  
 
|-
 
|-
  
| 05.51
+
| 05:51
  
 
| Then we apply '''divided difference algorithm''' and compute the '''divided difference table.'''  
 
| Then we apply '''divided difference algorithm''' and compute the '''divided difference table.'''  
Line 404: Line 351:
 
|-
 
|-
  
| 05.57
+
| 05:57
  
| Then we find the '''coefficient list''' of the '''Newton polynomial'''
+
| Then we find the '''coefficient list''' of the '''Newton polynomial'''.
  
 
|-
 
|-
  
| 06.03
+
| 06:03
 
+
| We sum the '''coefficient list''' to find the value of the '''function'''  at given '''data point.'''
+
 
+
 
+
  
 +
| We '''sum''' the '''coefficient list''' to find the value of the '''function'''  at given '''data point.'''
  
 
|-
 
|-
  
| 06.10
+
| 06:10
  
| Save and execute the file '''Newton underscore Divided dot sci.'''  
+
| '''Save and execute''' the file '''Newton underscore Divided dot sci.'''  
  
 
|-
 
|-
  
| 06.16
+
| 06:16
  
| Switch to '''Scilab console'''
+
| Switch to '''Scilab console'''.
 
|-
 
|-
  
| 06.19
+
| 06:19
  
|Clear the screen by typing '''c l c'''
+
|Clear the screen by typing '''c l c'''.
  
 
|-
 
|-
  
| 06.22
+
| 06:22
  
 
|Press '''Enter.'''  
 
|Press '''Enter.'''  
 
  
 
|-
 
|-
  
| 06.24
+
| 06:24
  
|Let us enter the '''data points vector'''
+
|Let us enter the '''data points vector'''.
  
 
|-
 
|-
  
| 06.27
+
| 06:27
  
|Type '''x equal to open square bracket two comma two point five comma three point two five comma four close square bracket '''
+
|Type: '''x equal to open square bracket two comma two point five comma three point two five comma four close square bracket'''
  
 
|-
 
|-
  
| 06.39
+
| 06:39
  
 
|Press '''Enter.'''  
 
|Press '''Enter.'''  
Line 461: Line 404:
 
|-
 
|-
  
| 06.41
+
| 06:41
  
 
|Then type values of the '''function'''
 
|Then type values of the '''function'''
 
|-
 
|-
  
| 06.44
+
| 06:44
  
 
|'''f equal to open square bracket zero point five comma zero point four comma zero point three zero seven seven comma zero point two five close square bracket'''
 
|'''f equal to open square bracket zero point five comma zero point four comma zero point three zero seven seven comma zero point two five close square bracket'''
Line 472: Line 415:
 
|-
 
|-
  
| 07.01
+
| 07:01
 
|Press '''Enter. '''
 
|Press '''Enter. '''
 
|-
 
|-
  
| 07.03
+
| 07:03
  
 
|Type '''x zero equal to three'''
 
|Type '''x zero equal to three'''
Line 482: Line 425:
 
|-
 
|-
  
| 07.06
+
| 07:06
  
 
|Press '''Enter.'''  
 
|Press '''Enter.'''  
Line 488: Line 431:
 
|-
 
|-
  
| 07.08
+
| 07:08
  
 
|Then call the '''function''' by typing  
 
|Then call the '''function''' by typing  
Line 494: Line 437:
 
|-
 
|-
  
| 07.11
+
| 07:11
 
+
|'''i p equal to Newton underscore Divided open parenthesis x comma f comma x zero close parenthesis'''
+
  
 +
|'''I P equal to Newton underscore Divided open parenthesis x comma f comma x zero close parenthesis'''
  
 
|-
 
|-
  
| 07.23
+
| 07:23
  
 
|Press '''Enter.'''  
 
|Press '''Enter.'''  
Line 507: Line 449:
 
|-
 
|-
  
| 07.25
+
| 07:25
  
 
|The value of '''y at x equal to three''' is shown.  
 
|The value of '''y at x equal to three''' is shown.  
Line 513: Line 455:
 
|-
 
|-
  
| 07.30
+
| 07:30
  
 
|Let us summarize this tutorial.  
 
|Let us summarize this tutorial.  
Line 519: Line 461:
 
|-
 
|-
  
| 07.33
+
| 07:33
 
+
|In this tutorial,
+
 
+
 
+
|-
+
 
+
| 07.34
+
 
+
|we have learnt to develop '''Scilab''' code for '''interpolation methods.'''
+
  
 +
|In this tutorial, we have learnt to develop '''Scilab''' code for '''interpolation methods.'''
  
 
|-
 
|-
  
| 07.40
+
| 07:40
  
 
|We have also learnt to find the value of a '''function''' at new '''data point.'''  
 
|We have also learnt to find the value of a '''function''' at new '''data point.'''  
Line 539: Line 473:
 
|-
 
|-
  
| 07.46
+
| 07:46
  
 
|Solve this problem on your own using '''Lagrange method and Newton's Divided Difference method.'''  
 
|Solve this problem on your own using '''Lagrange method and Newton's Divided Difference method.'''  
 
 
  
 
|-
 
|-
|07.54
+
|07:54
| Watch the video available at the  link shown below
+
| Watch the video available at the  link shown below.
  
 
|-
 
|-
  
| 07.57
+
| 07:57
 
+
| It summarises the Spoken Tutorial project
+
 
+
  
 +
| It summarizes the Spoken Tutorial project.
  
 
|-
 
|-
  
|08.00
+
|08:00
  
||If you do not have good bandwidth, you can download and watch it  
+
||If you do not have good bandwidth, you can download and watch it.
  
 
|-
 
|-
  
|08.05
+
|08:05
  
||The spoken tutorial project Team
+
||The spoken tutorial project Team:
  
 
|-
 
|-
  
|08.07
+
|08:07
  
 
||Conducts workshops using spoken tutorials  
 
||Conducts workshops using spoken tutorials  
 
  
 
|-
 
|-
  
|08.10
+
|08:10
 
+
||Gives certificates to those who pass an online test
+
  
 +
||Gives certificates to those who pass an online test.
  
 
|-
 
|-
  
|08.14
+
|08:14
  
 
||For more details, please write to contact@spoken-tutorial.org  
 
||For more details, please write to contact@spoken-tutorial.org  
 
  
 
|-
 
|-
  
|08.22
+
|08:22
 
+
|Spoken Tutorial Project is a part of the Talk to a Teacher project
+
 
+
  
 +
|Spoken Tutorial Project is a part of the Talk to a Teacher project.
  
 
|-
 
|-
  
| 08.26
+
| 08:26
  
 
| It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.  
 
| It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.  
 
|-
 
|-
  
| 08.33
+
| 08:33
  
|More information on this mission is available at  http://spoken-tutorial.org/NMEICT-Intro
+
|More information on this mission is available at  http://spoken-tutorial.org/NMEICT-Intro.
  
 
|-
 
|-
  
| 08.38
+
| 08:38
  
|This is Ashwini Patil signing off.
+
|This is Ashwini Patil, signing off.
  
 
|-
 
|-
  
|08.41
+
|08:41
  
 
| Thank you for joining.
 
| Thank you for joining.

Latest revision as of 11:18, 10 March 2017

Time Narration
00:01 Dear Friends, Welcome to the Spoken Tutorial on Numerical Interpolation.
00:06 At the end of this tutorial, you will learn how to:
00:10 Develop Scilab code for different Numerical Interpolation algorithms
00:16 Calculate new value of function from given data points.
00:21 To record this tutorial, I am using
00:24 Ubuntu 12.04 as the operating system
00:27 and Scilab 5.3.3 version.
00:31 To practice this tutorial, a learner should have
00:34 basic knowledge of Scilab
00:36 and should know Numerical Interpolation.
00:40 To learn Scilab, please refer to the relevant tutorials available on the Spoken Tutorial website.
00:47 Numerical interpolation is a method of
00:51 constructing new data points
00:53 within the range of a discrete set of known data points.
00:59 We can solve interpolation problems using numerical methods.
01:05 In Lagrange interpolation,
01:07 We pass a polynomial of degree N – 1 through N points.
01:12 Then, we find the unique N order polynomial y of x which interpolates the data samples.
01:22 We are given the natural logarithm values for nine, nine point five and eleven.
01:29 We have to find the value of natural logarithm of nine point two.
01:35 Let us solve this problem using Lagrange interpolation method.
01:41 Let us look at the code for Lagrange interpolation.
01:46 We define the function Lagrange with arguments x zero, x, f and n.
01:53 X zero is the unknown interpolation point.
01:57 x is the vector containing the data points.
02:01 f is the vector containing the values of the function at corresponding data points.
02:08 And n is the order of the interpolating polynomial.
02:14 We use n to initialize m and vector N.
02:19 The order of the interpolating polynomial determines the number of nodes created.
02:25 Then, we apply Lagrange interpolation formula
02:29 to find the value of the numerator and denominator.
02:35 Then we divide the numerator and denominator to get the value of L.
02:41 We use L to find the value of the function y at the given data point.
02:48 Finally we display the value of L and f of x f(x).
02:53 Let us Save and execute the file.
02:57 Switch to Scilab console to solve the example problem.
03:02 Let us define the data points vector.
03:05 On the console, type:
03:07 x equal to open square bracket nine point zero comma nine point five comma eleven point zero close square bracket.
03:18 Press Enter.
03:21 Then type: f equal to open square bracket two point one nine seven two comma two point two five one three comma two point three nine seven nine close square bracket
03:39 Press Enter .
03:41 Then type x zero equal to nine point two
03:46 Press Enter.
03:48 Let us use a quadratic polynomial interpolating polynomial.
03:53 Type n equal to two.
03:58 Press Enter.
04:00 To call the function, type:
04:02 y equal to Lagrange open parenthesis x zero comma x comma f comma n close parenthesis
04:14 Press Enter.
04:16 The value of the function y at x equal to nine point two is displayed.
04:22 Let us look at Newton's Divided Difference Method.
04:26 In this method, Divided Differences recursive method is used.
04:32 It uses lesser number of computation than Lagrange method.
04:38 In spite of this, the same interpolating polynomial, as in Lagrange method, is generated.
04:47 Let us solve this example using Divided Difference method.
04:52 We are given the data points and
04:54 the corresponding values of the function at those data points.
05:00 We have to find the value of the function at x equal to three.
05:05 Let us look at the code for Newton Divided Difference method.
05:11 Open the file Newton underscore Divided dot sci on Scilab Editor.
05:18 We define the function Newton underscore Divided with arguments x, f and x zero.
05:29 x is a vector containing the data points,
05:33 f is the corresponding function value and
05:36 x zero is the unknown interpolation point.
05:41 We find the length of vector and then equate it to n.
05:46 The first value of vector is equated to a of one a(1).
05:51 Then we apply divided difference algorithm and compute the divided difference table.
05:57 Then we find the coefficient list of the Newton polynomial.
06:03 We sum the coefficient list to find the value of the function at given data point.
06:10 Save and execute the file Newton underscore Divided dot sci.
06:16 Switch to Scilab console.
06:19 Clear the screen by typing c l c.
06:22 Press Enter.
06:24 Let us enter the data points vector.
06:27 Type: x equal to open square bracket two comma two point five comma three point two five comma four close square bracket
06:39 Press Enter.
06:41 Then type values of the function
06:44 f equal to open square bracket zero point five comma zero point four comma zero point three zero seven seven comma zero point two five close square bracket
07:01 Press Enter.
07:03 Type x zero equal to three
07:06 Press Enter.
07:08 Then call the function by typing
07:11 I P equal to Newton underscore Divided open parenthesis x comma f comma x zero close parenthesis
07:23 Press Enter.
07:25 The value of y at x equal to three is shown.
07:30 Let us summarize this tutorial.
07:33 In this tutorial, we have learnt to develop Scilab code for interpolation methods.
07:40 We have also learnt to find the value of a function at new data point.
07:46 Solve this problem on your own using Lagrange method and Newton's Divided Difference method.
07:54 Watch the video available at the link shown below.
07:57 It summarizes the Spoken Tutorial project.
08:00 If you do not have good bandwidth, you can download and watch it.
08:05 The spoken tutorial project Team:
08:07 Conducts workshops using spoken tutorials
08:10 Gives certificates to those who pass an online test.
08:14 For more details, please write to contact@spoken-tutorial.org
08:22 Spoken Tutorial Project is a part of the Talk to a Teacher project.
08:26 It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.
08:33 More information on this mission is available at http://spoken-tutorial.org/NMEICT-Intro.
08:38 This is Ashwini Patil, signing off.
08:41 Thank you for joining.

Contributors and Content Editors

Gaurav, PoojaMoolya, Sandhya.np14