Answered step by step
Verified Expert Solution
Link Copied!

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 CODEimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Provide the major organic product of the following reaction

Answered: 1 week ago