Professional Documents
Culture Documents
Exp 5 Matlab
Exp 5 Matlab
Output: -
enter the number of variables to be solved3
the coefficients of equations are to be entered in a diagonal dominant manner
Enter the coefficients of equation 1 as a row vector: [52 20 25]
Enter the constant of equation 1 : 4800
Enter the coefficients of equation 2 as a row vector: [30 50 20]
Enter the constant of equation 2 : 5810
Enter the coefficients of equation 3 as a row vector: [18 30 55]
Enter the constant of equation 3 : 5690
enter the initial guess values for the variables as row vector:[38 68 50]
input the tolerence needed:0.00001
1 42.1154 70.9308 50.9818
2 40.5161 71.4976 51.196
3 40.1951 71.6045 51.2428
4 40.1316 71.624 51.253
5 40.1192 71.6273 51.2552
6 40.1168 71.6278 51.2557
the final set of solution for given equation system is 40.1168 71.6278
51.2557
Output:-