use python (.m file)
Can you follow the procedure code to do this function?
Procedure Gauss(n, a, b) e real: (a)nxn, (b)nx1, (x)nx1, rmax, smax, xmult integer: n, lnx1, P • for i from 1 to n do • endfor • for k=1 to n-1 do ●rmax < 0 for ik to n do a smax (0 • for j = k to n do • smax + max(smax, la,j) • endfor ← if rmax < |a.k/smax| ●rmax lat,,k/smax • pri endif • endfor
% Elinimation Step for ik 1 to n do xmultak/ak • 31₁ k 40 for j k + 1 to n do = • ajaj(xmult) ak • endfor • bebe (xmult) bex endfor endfor • Xn= ben/an.n for in-1 to 1 step -1 do • sum <- be for j =i+1 to n do sum-sum - aj x xj • endfor X; (sum)/a, endfor
use python (.m file) Can you follow the procedure code to do this function?
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am