Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 CODE
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) endStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started