Difference between revisions of "Scilab/C4/Interpolation/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) (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…') |
|||
Line 1: | Line 1: | ||
{| Border=1 | {| Border=1 | ||
− | | | + | |'''Time''' |
− | + | |'''Narration''' | |
− | + | ||
|- | |- | ||
− | | 00 | + | | 00:01 |
|Dear Friends, | |Dear Friends, | ||
|- | |- | ||
− | | 00 | + | | 00:02 |
| Welcome to the Spoken Tutorial on '''“Numerical Interpolation” ''' | | Welcome to the Spoken Tutorial on '''“Numerical Interpolation” ''' | ||
|- | |- | ||
− | | 00 | + | | 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 | + | |00:10 |
|Develop '''Scilab code''' for different '''Numerical Interpolation algorithms''' | |Develop '''Scilab code''' for different '''Numerical Interpolation algorithms''' | ||
|- | |- | ||
− | |00 | + | |00:16 |
|Calculate new value of '''function''' from given '''data points''' | |Calculate new value of '''function''' from given '''data points''' | ||
|- | |- | ||
− | | 00 | + | | 00:21 |
|To record this tutorial, I am using | |To record this tutorial, I am using | ||
|- | |- | ||
− | |00 | + | |00:24 |
|'''Ubuntu 12.04''' as the operating system | |'''Ubuntu 12.04''' as the operating system | ||
− | |||
|- | |- | ||
− | | 00 | + | | 00:27 |
|and '''Scilab 5.3.3''' version | |and '''Scilab 5.3.3''' version | ||
|- | |- | ||
− | | 00 | + | | 00:31 |
| To practise this tutorial, a learner should have | | To practise this tutorial, a learner should have | ||
|- | |- | ||
− | |00 | + | |00:34 |
|basic knowledge of '''Scilab''' | |basic knowledge of '''Scilab''' | ||
|- | |- | ||
− | |00 | + | |00:36 |
|and should know '''Numerical Interpolation''' | |and should know '''Numerical Interpolation''' | ||
|- | |- | ||
− | | 00 | + | | 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. '''Spoken Tutorial''' website. | ||
|- | |- | ||
− | | 00 | + | | 00:47 |
| '''Numerical interpolation''' is a method of | | '''Numerical interpolation''' is a method of | ||
|- | |- | ||
− | |00 | + | |00:51 |
|constructing new '''data points''' | |constructing new '''data points''' | ||
|- | |- | ||
− | |00 | + | |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 | + | |00:59 |
|We can solve '''interpolation''' problems using '''numerical methods.''' | |We can solve '''interpolation''' problems using '''numerical methods.''' | ||
Line 74: | Line 72: | ||
|- | |- | ||
− | |01 | + | |01:05 |
|In '''Lagrange interpolation,''' | |In '''Lagrange interpolation,''' | ||
Line 80: | Line 78: | ||
|- | |- | ||
− | | 01 | + | | 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 84: | ||
|- | |- | ||
− | | 01 | + | | 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 | + | |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 | + | |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 | + | |01:35 |
|Let us solve this problem using '''Lagrange interpolation method.''' | |Let us solve this problem using '''Lagrange interpolation method.''' | ||
− | |||
|- | |- | ||
− | |01 | + | |01:41 |
|Let us look at the code for '''Lagrange interpolation.''' | |Let us look at the code for '''Lagrange interpolation.''' | ||
Line 118: | Line 111: | ||
|- | |- | ||
− | |01 | + | |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 | + | |01:53 |
|'''X zero''' is the unknown '''interpolation point.''' | |'''X zero''' is the unknown '''interpolation point.''' | ||
− | |||
− | |||
|- | |- | ||
− | | 01 | + | | 01:57 |
|'''x''' is the '''vector''' containing the '''data points.''' | |'''x''' is the '''vector''' containing the '''data points.''' | ||
− | |||
− | |||
|- | |- | ||
− | | 02 | + | | 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 correspoding '''data points.''' | ||
Line 142: | Line 131: | ||
|- | |- | ||
− | |02 | + | |02:08 |
||And '''n''' is the '''order''' of the '''interpolating polynomial.''' | ||And '''n''' is the '''order''' of the '''interpolating polynomial.''' | ||
|- | |- | ||
− | |02 | + | |02:14 |
− | + | ||
| We use '''n''' to initialize '''m''' and '''vector N.''' | | We use '''n''' to initialize '''m''' and '''vector N.''' | ||
Line 154: | Line 142: | ||
|- | |- | ||
− | |02 | + | |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 148: | ||
|- | |- | ||
− | | 02 | + | | 02:25 |
|| Then, we apply '''Lagrange interpolation formula''' | || Then, we apply '''Lagrange interpolation formula''' | ||
Line 166: | Line 154: | ||
|- | |- | ||
− | | 02 | + | | 02:29 |
| to find the value of the '''numerator''' and '''denominator.''' | | to find the value of the '''numerator''' and '''denominator.''' | ||
|- | |- | ||
− | |02 | + | |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 | + | |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 | + | | 02:48 |
| Finally we display the value of '''L''' and '''f of x.''' | | Finally we display the value of '''L''' and '''f of x.''' | ||
− | |||
|- | |- | ||
− | | 02 | + | | 02:53 |
|Let us save and execute the file | |Let us save and execute the file | ||
− | |||
− | |||
|- | |- | ||
− | | 02 | + | | 02:57 |
|Switch to '''Scilab console''' to solve the example problem. | |Switch to '''Scilab console''' to solve the example problem. | ||
− | |||
|- | |- | ||
− | | 03 | + | | 03:02 |
|Let us define the '''data points vector.''' | |Let us define the '''data points vector.''' | ||
|- | |- | ||
− | |03 | + | |03:05 |
| On the '''console''' type, | | On the '''console''' type, | ||
|- | |- | ||
− | | 03 | + | | 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 | + | | 03:18 |
|Press '''Enter''' | |Press '''Enter''' | ||
− | |||
− | |||
|- | |- | ||
− | | 03 | + | | 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 | + | |03:39 |
||Press '''Enter ''' | ||Press '''Enter ''' | ||
Line 229: | Line 209: | ||
|- | |- | ||
− | | 03 | + | | 03:41 |
| Then type '''x zero equal to nine point two''' | | Then type '''x zero equal to nine point two''' | ||
Line 236: | Line 216: | ||
|- | |- | ||
− | | 03 | + | | 03:46 |
| Press '''Enter''' | | Press '''Enter''' | ||
Line 243: | Line 223: | ||
|- | |- | ||
− | | 03 | + | | 03:48 |
| Let us use a '''quadratic polynomial interpolating polynomial.''' | | Let us use a '''quadratic polynomial interpolating polynomial.''' | ||
Line 250: | Line 230: | ||
|- | |- | ||
− | |03 | + | |03:53 |
||Type '''n equal to two''' | ||Type '''n equal to two''' | ||
Line 257: | Line 237: | ||
|- | |- | ||
− | |03 | + | |03:58 |
|Press '''Enter''' | |Press '''Enter''' | ||
Line 264: | Line 244: | ||
|- | |- | ||
− | | 04 | + | | 04:00 |
| To call the '''function,''' type | | To call the '''function,''' type | ||
Line 273: | Line 253: | ||
|- | |- | ||
− | | 04 | + | | 04:02 |
|'''y equal to Lagrange open paranthesis x zero comma x comma f comma n close paranthesis''' | |'''y equal to Lagrange open paranthesis x zero comma x comma f comma n close paranthesis''' | ||
Line 281: | Line 261: | ||
|- | |- | ||
− | | 04 | + | | 04:14 |
| Press '''Enter. ''' | | Press '''Enter. ''' | ||
Line 287: | Line 267: | ||
|- | |- | ||
− | | 04 | + | | 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 273: | ||
|- | |- | ||
− | | 04 | + | | 04:22 |
||Let us look at '''Newton's Divided Difference Method.''' | ||Let us look at '''Newton's Divided Difference Method.''' | ||
Line 300: | Line 280: | ||
|- | |- | ||
− | | 04 | + | | 04:26 |
||In this method, '''Divided Differences recursive method''' is used. | ||In this method, '''Divided Differences recursive method''' is used. | ||
Line 306: | Line 286: | ||
|- | |- | ||
− | | 04 | + | | 04:32 |
||It uses lesser number of '''computation''' than '''Lagrange method.''' | ||It uses lesser number of '''computation''' than '''Lagrange method.''' | ||
Line 312: | Line 292: | ||
|- | |- | ||
− | | 04 | + | | 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. | ||
Line 320: | Line 300: | ||
|- | |- | ||
− | | 04 | + | | 04:47 |
|Let us solve this example using '''Divided Difference method.''' | |Let us solve this example using '''Divided Difference method.''' | ||
Line 327: | Line 307: | ||
|- | |- | ||
− | |04 | + | |04:52 |
|We are given the '''data points''' and | |We are given the '''data points''' and | ||
Line 335: | Line 315: | ||
|- | |- | ||
− | | 04 | + | | 04:54 |
| the corresponding values of the '''function''' at those '''data points.''' | | the corresponding values of the '''function''' at those '''data points.''' | ||
Line 344: | Line 324: | ||
|- | |- | ||
− | | 05 | + | | 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 330: | ||
|- | |- | ||
− | | 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 336: | ||
|- | |- | ||
− | | 05 | + | | 05:11 |
|Open the file '''Newton underscore Divided dot sci''' on '''Scilab Editor.''' | |Open the file '''Newton underscore Divided dot sci''' on '''Scilab Editor.''' | ||
Line 363: | Line 343: | ||
|- | |- | ||
− | | 05 | + | | 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.''' | ||
Line 370: | Line 350: | ||
|- | |- | ||
− | | 05 | + | | 05:29 |
| '''x''' is a '''vector''' containing the '''data points,''' | | '''x''' is a '''vector''' containing the '''data points,''' | ||
Line 377: | Line 357: | ||
|- | |- | ||
− | | 05 | + | | 05:33 |
|'''f''' is the corresponding '''function value''' and | |'''f''' is the corresponding '''function value''' and | ||
Line 384: | Line 364: | ||
|- | |- | ||
− | | 05 | + | | 05:36 |
| '''x zero''' is the unknown '''interpolation point.''' | | '''x zero''' is the unknown '''interpolation point.''' | ||
|- | |- | ||
− | | 05 | + | | 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 | + | | 05:46 |
| The first value of '''vector''' is equated to '''a of one.''' | | The first value of '''vector''' is equated to '''a of one.''' | ||
Line 398: | Line 378: | ||
|- | |- | ||
− | | 05 | + | | 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 384: | ||
|- | |- | ||
− | | 05 | + | | 05:57 |
| Then we find the '''coefficient list''' of the '''Newton polynomial''' | | Then we find the '''coefficient list''' of the '''Newton polynomial''' | ||
Line 410: | Line 390: | ||
|- | |- | ||
− | | 06 | + | | 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.''' | ||
Line 419: | Line 399: | ||
|- | |- | ||
− | | 06 | + | | 06:10 |
| Save and execute the file '''Newton underscore Divided dot sci.''' | | Save and execute the file '''Newton underscore Divided dot sci.''' | ||
Line 425: | Line 405: | ||
|- | |- | ||
− | | 06 | + | | 06:16 |
| Switch to '''Scilab console''' | | Switch to '''Scilab console''' | ||
|- | |- | ||
− | | 06 | + | | 06:19 |
|Clear the screen by typing '''c l c''' | |Clear the screen by typing '''c l c''' | ||
Line 436: | Line 416: | ||
|- | |- | ||
− | | 06 | + | | 06:22 |
|Press '''Enter.''' | |Press '''Enter.''' | ||
Line 443: | Line 423: | ||
|- | |- | ||
− | | 06 | + | | 06:24 |
|Let us enter the '''data points vector''' | |Let us enter the '''data points vector''' | ||
Line 449: | Line 429: | ||
|- | |- | ||
− | | 06 | + | | 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 ''' | ||
Line 455: | Line 435: | ||
|- | |- | ||
− | | 06 | + | | 06:39 |
|Press '''Enter.''' | |Press '''Enter.''' | ||
Line 461: | Line 441: | ||
|- | |- | ||
− | | 06 | + | | 06:41 |
|Then type values of the '''function''' | |Then type values of the '''function''' | ||
|- | |- | ||
− | | 06 | + | | 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 452: | ||
|- | |- | ||
− | | 07 | + | | 07:01 |
|Press '''Enter. ''' | |Press '''Enter. ''' | ||
|- | |- | ||
− | | 07 | + | | 07:03 |
|Type '''x zero equal to three''' | |Type '''x zero equal to three''' | ||
Line 482: | Line 462: | ||
|- | |- | ||
− | | 07 | + | | 07:06 |
|Press '''Enter.''' | |Press '''Enter.''' | ||
Line 488: | Line 468: | ||
|- | |- | ||
− | | 07 | + | | 07:08 |
|Then call the '''function''' by typing | |Then call the '''function''' by typing | ||
Line 494: | Line 474: | ||
|- | |- | ||
− | | 07 | + | | 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''' | ||
Line 501: | Line 481: | ||
|- | |- | ||
− | | 07 | + | | 07:23 |
|Press '''Enter.''' | |Press '''Enter.''' | ||
Line 507: | Line 487: | ||
|- | |- | ||
− | | 07 | + | | 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 493: | ||
|- | |- | ||
− | | 07 | + | | 07:30 |
|Let us summarize this tutorial. | |Let us summarize this tutorial. | ||
Line 519: | Line 499: | ||
|- | |- | ||
− | | 07 | + | | 07:33 |
|In this tutorial, | |In this tutorial, | ||
Line 526: | Line 506: | ||
|- | |- | ||
− | | 07 | + | | 07:34 |
|we have learnt to develop '''Scilab''' code for '''interpolation methods.''' | |we have learnt to develop '''Scilab''' code for '''interpolation methods.''' | ||
Line 533: | Line 513: | ||
|- | |- | ||
− | | 07 | + | | 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 519: | ||
|- | |- | ||
− | | 07 | + | | 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.''' | ||
Line 546: | Line 526: | ||
|- | |- | ||
− | |07 | + | |07:54 |
| Watch the video available at the link shown below | | Watch the video available at the link shown below | ||
|- | |- | ||
− | | 07 | + | | 07:57 |
| It summarises the Spoken Tutorial project | | It summarises the Spoken Tutorial project | ||
Line 559: | Line 539: | ||
|- | |- | ||
− | |08 | + | |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 | ||
Line 565: | Line 545: | ||
|- | |- | ||
− | |08 | + | |08:05 |
||The spoken tutorial project Team | ||The spoken tutorial project Team | ||
Line 571: | Line 551: | ||
|- | |- | ||
− | |08 | + | |08:07 |
||Conducts workshops using spoken tutorials | ||Conducts workshops using spoken tutorials | ||
Line 578: | Line 558: | ||
|- | |- | ||
− | |08 | + | |08:10 |
||Gives certificates to those who pass an online test | ||Gives certificates to those who pass an online test | ||
Line 585: | Line 565: | ||
|- | |- | ||
− | |08 | + | |08:14 |
||For more details, please write to contact@spoken-tutorial.org | ||For more details, please write to contact@spoken-tutorial.org | ||
Line 592: | Line 572: | ||
|- | |- | ||
− | |08 | + | |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 | ||
Line 600: | Line 580: | ||
|- | |- | ||
− | | 08 | + | | 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 | + | | 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 | ||
Line 611: | Line 591: | ||
|- | |- | ||
− | | 08 | + | | 08:38 |
|This is Ashwini Patil signing off. | |This is Ashwini Patil signing off. | ||
Line 617: | Line 597: | ||
|- | |- | ||
− | |08 | + | |08:41 |
| Thank you for joining. | | Thank you for joining. |
Revision as of 10:23, 11 July 2014
Time | Narration |
00:01 | Dear Friends, |
00:02 | 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 practise 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. 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 xwhich 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 correspoding 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. |
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 paranthesis x zero comma x comma f comma n close paranthesis
|
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. |
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,
|
07:34 | 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 summarises 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. |