Scilab/C4/Interpolation/Gujarati
From Script | Spoken-Tutorial
Revision as of 15:12, 30 December 2015 by Jyotisolanki (Talk | contribs)
Time | Narration |
00:01 | નમસ્તે મિત્રો, |
00:02 | Numerical Interpolation પરના આ સ્પોકન ટ્યુટોરિયલમાં તમારું સ્વાગત છે. . |
00:06 | આ ટ્યુટોરીયલના અંતમાં તમે શીખીશું કેવી રીતે: |
00:10 | વિવિધ Numerical Interpolation algorithms ના માટે સાઈલેબ કોડ કેવી રીતે બનાવાય છે. |
00:16 | આપેલ પોઈન્ટસ થી function ની નવી વેલ્યુની ગણતરી કરવી. |
00:21 | આ ટ્યુટોરિયલ રિકોર્ડ કરવા માટે હું ઉપયોગ કરી રહી છું, |
00:24 | Scilab 5.3.3 વર્જનના સાથે.
|
00:27 | Ubuntu 12.04 ઓપરેટીંગ સીસ્ટમ |
00:31 | આ ટ્યુટોરિયલ ના અભ્યાસ પહેલા શીખનારને |
00:34 | Scilab અને |
00:36 | Numerical Interpolation નું સામન્ય જ્ઞાન હોવું જોઈએ. |
00:40 | સાઈલેબ માટે સ્પોકન ટ્યુટોરિયલ વેબ સાઈટ પર ઉપલબ્ધ સંબંધિત ટ્યુટોરિયલ જુઓ. |
00:47 | Numerical interpolation મેળવેલ data points ના discrete set ના રેંજના અંદર ડેટા પોઈન્ટસ ને બનાવવાનું એક મેથડ છે.
|
00:59 | આપણે numerical methods. નો ઉપયોગ કરીને interpolation ના પ્રશ્નને હલ કરી શકીએ છીએ. |
01:05 | Lagrange interpolation, માં |
01:07 | આપણે N પોઈન્ટસ થી N – 1 ના polynomial ને પાસ કરીએ છીએ |
01:12 | પછી આપણે વિશિષ્ટ N order polynomial y of x ને મેળવીએ છીએ જે ડેટા સેમ્પલને ઇન્ટરપોલેટ કરે છે. |
01:22 | આપણે nine, nine point five અને eleven ની natural logarithm વેલ્યુ આપેલ છે. |
01:29 | આપણે nine point two ની natural logarithm વેલ્યુ મેળવવાની છે. |
01:35 | ચાલો Lagrange interpolation method. (લેગરેંગ ઇન્ટરપોલેશન મેથડ) નો ઉપયોગ કરીને આ સવાલને હલ કરીએ. |
01:41 | ચાલો Lagrange interpolation. (લેગરેંગ ઇન્ટરપોલેશન મેથડ) ના માટે કોડ જોઈએ. |
01:46 | આપણે arguments x zero, x, f અને n. ના સાથે Lagrange (લેગરેંગ) ફંક્શનને વ્યાખ્યાયિત કરીએ છીએ. |
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, |
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 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. |