Question: SOLVE AS CODE Type the code shown in the left box into your compute cell. Then use the pseudo code to write a program to

SOLVE AS CODESOLVE AS CODE Type the code shown in the left box into

Type the code shown in the left box into your compute cell. Then use the pseudo code to write a program to perform the forward elimination step for nave Gauss Elimination (no pivoting). Print the resulting matrix and RHS to the screen. The answers should be: -6 1 A0 7.67 1.33b b-1.33 7.89 7.89 import numpy as np Pseudocode for forward naive elimination for k- 1 to n-1 np . asarray ([[-6.0, 1.0, 1.0], [2.0,-8.0,1.0], [3.0,3.0,-9.0], # # # 1st row 2nd row 3rd row A fori k+1 to n factorA(i,k)/A(k,k) for j-k+1 to n b np .asarray([[7.0], # RHS vector [-1.01, [-12.0, end b(i) -b(i) - factor*b(k) end x np. zeros ((3,1)) # Empty solution vector n len(A) # number of equations (Add code here) end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!