Scilab/C4/Linear-equations-Gaussian-Methods/Gujarati
From Script | Spoken-Tutorial
Revision as of 12:53, 14 December 2015 by Jyotisolanki (Talk | contribs)
| Time | Narration |
| 00:01 | Dear Friends, |
| 00:02 | Gauss Elimination (ગોસ એલિમિનેશન) અને Gauss-Jordan Methods (ગોસ જોર્ડન મેથડ) ને વાપરીને Linear Equations using (લીનીયર ઇક્વેશન) સોલ્વીંગ સીસ્ટમ પરના સ્પોકન ટ્યુટોરિયલમાં તમારું સ્વાગત છે. . |
| 00:12. | આ ટ્યુટોરીયલ ઓવરને અંતે તમે શીખશો કેવી રીતે: |
| 00:15 | Scilab વાપરીને લીનીયર ઇક્વેશન ના સીસ્ટમને કેવી રીતે હલ કરાય. |
| 00:20 | linear equations ને હક કરવા માટે સાઈલેબ કોડ કેવી રીતે બનાવાય. |
| 00:25 | આ ટ્યુટોરિયલ રિકોર્ડ કરવા માટે હું ઉપયોગ કરી રહી છું, |
| 00:27 | Scilab 5.3.3 વર્જન સાથે . |
| 00:31 | Ubuntu 12.04ઓપરેટીંગ સીસ્ટમ . |
| 00:36 | આ ટ્યુટોરિયલ ના અભ્યાસ માટે તમને Scilab નું સમાન્ય જ્ઞાન હોવું જોઈએ. |
| 00:40 | અને Linear Equations. ને કેવી રીતે હલ કરાય તેની જાન હોવી જોઈએ. |
| 00:45 | સાઈલેબ ને શીખવા માટે સ્પોકન ટ્યુટોરિયલ વેબ સાઈટ પર સાઈલેબ પર ઉપલબ્ધ સંબંધિત ટ્યુટોરિયલ જુઓ. |
| 00:52 | લીનીયર ઇક્વેશન વેરીએબલસના |
| 00:55 | તેજ સેટની લીનીયર ઇક્વેશન માં સંગ્રહ થાય છે. |
| 01:00 | Gauss elimination method (ગોસ એલિમિનેશન મેથડ) ના વિષે શીખીએ. |
| 01:04 | ઇક્વેશનનું સીસ્ટમ આપેલ છે. |
| 01:06 | A x equal to b . |
| 01:12 | augmented matrix (ઓગમેનટેડ મેટ્રિકસ) એક મેટ્રિકમાં ઇક્વેશનસ ના સીસ્ટમમાં constants b one થી b n ના સાથે વેરીએબલસ a one થી a n coefficients લખીએ છીએ. |
| 01:27 | આપણે તે augmented matrix' (ઓગમેનટેડ મેટ્રિકસ) ના upper triangular form matrix માં કેવી રીતે બદલીએ છીએ ? |
| 01:33 | આપણે આવું મેટ્રીક્સ ની રોમાં બદલાવ અનુસાર કરીએ છીએ. |
| 01:40 | ચાલો Gaussian elimination method નો ઉપયોગ કરીને ઇક્વેશનસના આ સીસ્ટમને હલ કરીએ. |
| 01:45 | સીસ્ટમને હલ કરવા પહેલા આપણે Gaussian elimination method. ના માટે કોડ જોઈએ. |
| 01:52 | કોડ ની પ્રથમ લાઈન format e comma twenty છે. |
| 01:58 | આ વ્યાખ્યાયિત કરે છે કે જવાબમાં કેટલા ડીજીટસ પ્રદશિત થવા જોઈએ. |
| 02:04 | સિંગલ કોટમાં અક્ષર 'e' દેખાડે છે કે જવાબ scientific notation માં પ્રદશિત થવું જોઈએ. |
| 02:12 | । નંબર twenty ડીજીટની સંખ્યા છે જે પ્રદશિત થવી જોઈએ. |
| 02:17 | જ્યારે વેરીએબલસ પુનઃવ્યાખ્યાયિત થાય છે તે જાણવા માટે કે સાઈલેબ શું કરે છે funcprot કમાંડ નો ઉપયોગ થાય છે. |
| 02:26 | આર્ગ્યુમેન્ટ zero બતાડે છે કે વેરીએબલ કે જ્યારે વેરીએબલસ પુનઃવ્યાખ્યાયિત થાય છે તો સાઈલેબને કઈ કરવાની જરૂર નથી હોતી. |
| 02:33 | અન્ય આર્ગ્યુમેન્ટસ વોર્નિગ અથવા એર્ર્ર્સ ને ઈશુ કરવા માં ઉપયોગ થાય છે જો વેરીએબલસ પુનઃવ્યાખ્યાયિત થાય છે. |
| 02:40 | આગળ આપણે ઈનપુટ ફન્કશન નો ઉપયોગ કરીશું. |
| 02:43 | આ યુજરને એક મેસેજ દેખાડશે A અને b મેટ્રાઈસીસ ની વેલ્યુઓ ને મેળવશે. |
| 02:51 | મેસેજ double quotes. માં દેખાવું જોઈએ. |
| 02:55 | મેટ્રાઈસીસ જે યુજર ઉમેરે છે વેરીએબલસ A અને b. માં સંગ્રહિત કરાશે. |
| 03:02 | અહી A એ coefficient matrix છે અને b ની જમણી બાજુના મેટ્રીક્સ અથવા constants matrix. છે. |
| 03:11 | પછી આપણે ફંક્શન naive gaussian elimination. (નેઈવ ગોશીયન એલિમિનેશન) ને વ્યાખ્યાયિત કરે છે. |
| 03:15 | અને આપણે સ્પષ્ટ કરીએ છીએ કે A અને b naive gaussian elimination. (નેઈવ ગોશીયન એલિમિનેશન) ફંક્શન નું આર્ગ્યુમેન્ટસ છે. |
| 03:22 | આપણે વેરીએબલ x. માં આઉટ પુટ સંગ્રહિત કરીએ છીએ. |
| 03:27 | Then we find the size of matrices A and b using the size command. |
| 03:34 | Since they are two dimensional matrices, we use n and n one to store the size of matrix A. |
| 03:42 | Similarly we can use m one and p for matrix b. |
| 03:48 | Then we have to determine if the matrices are compatible with each other and |
| 03:53 | if A is a square matrix. |
| 03:57 | If n and n one are not equal then we display a message that Matrix A must be square. |
| 04:05 | If n and m one are not equal, we display a message |
| 04:10 | incompatible dimension of A and b. |
| 04:15 | If the matrices are compatible, we place matrices A and b in one matrix, C. |
| 04:23 | This matrix C is called augmented matrix. |
| 04:28 | The next block of code performs forward elimination. |
| 04:32 | This code converts the augmented matrix to upper triangular matrix form. |
| 04:39 | Finally, we perform back substitution. |
| 04:42 | Once the upper triangular matrix is obtained, we take the last row and find the value of the variable in that row. |
| 04:52 | Then once one variable is solved, we take this variable to solve the other variables. |
| 04:59 | Thus the system of linear equations is solved. |
| 05:03 | Let us save and execute the file. |
| 05:06 | Switch to Scilab console to solve the example. |
| 05:10 | On the console, we have a prompt to enter the value of the coefficient matrix. |
| 05:17 | So we enter the values of matrix A. |
| 05:20 | Type: square bracket three point four one space one point two three space minus one point zero nine semi colon |
| 05:33 | two point seven one space two point one four space one point two nine semi colon |
| 05:41 | one point eight nine space minus one point nine one space minus one point eight nine close square bracket. |
| 05:53 | Press Enter. |
| 05:54 | The next prompt is for matrix b. |
| 05:57 | So we type |
| 05:58 | open square bracket four point seven two semi colon three point one semi colon two point nine one close square bracket. |
| 06:10 | Press Enter. |
| 06:13 | Then we call the function by typing |
| 06:16 | naive gaussian elimination open parenthesis A comma b close parenthesis |
| 06:24 | Press Enter. |
| 06:26 | The solution to the system of linear equations is shown on Scilab console. |
| 06:32 | Next we shall study the Gauss-Jordan method. |
| 06:36 | In Gauss–Jordan Method, |
| 06:38 | the first step is to form the augmented matrix. |
| 06:42 | To do this, place the coefficient matrix A and the right hand side matrix b together in one matrix. |
| 06:50 | Then we perform row operations to convert matrix A to diagonal form. |
| 06:56 | In diagonal form, only the elements a i i are non-zero. Rest of the elements are zero. |
| 07:05 | Then we divide the diagonal element and corresponding element of right hand side element, by the diagonal element. |
| 07:14 | We do this to get diagonal element equal to one. |
| 07:19 | The resulting value of the elements of each row of the right hand side matrix gives the value of each variable. |
| 07:27 | Let us solve this example using Gauss-Jordan Method. |
| 07:33 | Let us look at the code first. |
| 07:36 | The first line of the code uses format function to specify the format of the displayed answers. |
| 07:44 | The parameter e specifies the answer should be in scientific notation. |
| 07:49 | Twenty (20) denotes that only twenty digits should be displayed. |
| 07:55 | Then we get the A and b matrix using the input function. |
| 08:00 | We define the function Gauss Jordan Elimination with input arguments A and b and output argument x. |
| 08:11 | We get the size of matrix A and store it in m and n. |
| 08:17 | Similarly, we get the size of matrix b and store it in r and s. |
| 08:23 | If the sizes of A and b are not compatible, we display an error on the console using error function. |
| 08:33 | Then we perform row operations to get diagonal form of the matrix. |
| 08:38 | Here pivot refers to the first non-zero element of a column. |
| 08:45 | Then we create a matrix of zeros called x with m rows and s columns. |
| 08:52 | Once we have the diagonal form, |
| 08:54 | we divide the right hand side part of augmented matrix by the corresponding diagonal element to get the value of each variable. |
| 09:04 | We store the value of each variable in x. |
| 09:08 | Then we return the value of x. |
| 09:11 | Finally, we end the function. |
| 09:13 | Now let us save and execute the function. |
| 09:18 | The prompt requires us to enter the value of matrix A. |
| 09:22 | So we type |
| 09:23 | open square bracket zero point seven comma one seven two five semi colon |
| 09:31 | zero point four three five two comma minus five point four three three close square bracket. |
| 09:41 | Press Enter. |
| 09:43 | The next prompt is for vector b. |
| 09:45 | So we type open square bracket one seven three nine semi colon |
| 09:51 | three point two seven one close square bracket. |
| 09:55 | Press Enter. |
| 09:58 | Then we call the function by typing |
| 10:01 | Gauss Jordan Elimination open parenthesis A comma b close parenthesis |
| 10:08 | Press Enter. |
| 10:10 | The values of x one and x two are shown on the console. |
| 10:15 | Let us summarize this tutorial. |
| 10:18 | In this tutorial, we have learnt to: |
| 10:21 | Develop Scilab code for solving system of linear equations. |
| 10:25 | Find the value of the unknown variables of a system of linear equations. |
| 10:32 | Watch the video available at the link shown below. |
| 10:35 | It summarizes the Spoken Tutorial project. |
| 10:38 | If you do not have good bandwidth, you can download and watch it. |
| 10:43 | The spoken tutorial project Team: |
| 10:45 | Conducts workshops using spoken tutorials. |
| 10:48 | Gives certificates to those who pass an online test. |
| 10:52 | For more details, please write to conatct@spoken-tutorial.org. |
| 10:59 | Spoken Tutorial Project is a part of the Talk to a Teacher project. |
| 11:03 | It is supported by the National Mission on Eduction through ICT, MHRD, Government of India. |
| 11:10 | More information on this mission is available at http://spoken-tutorial.org/NMEICT-Intro. |
| 11:21 | This is Ashwini Patil, signing off. |
| 11:23 | Thank you for joining. |