Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON CODE ***IMPORTANT*** DEVELOP A SIMPLE CODE FOR BEGINNERS, IT IS NECESSARY TO EXPLAIN EACH LINE ADDING COMMENTS. I PRETTY MUCH HAVE THE CODE DEVELOPED

PYTHON CODE

***IMPORTANT***

DEVELOP A SIMPLE CODE FOR BEGINNERS, IT IS NECESSARY TO EXPLAIN EACH LINE ADDING COMMENTS. I PRETTY MUCH HAVE THE CODE DEVELOPED BUT DON'T KNOW HOW TO EXPLAIN IT. SO, IF YOU ADD YOUR CODE WITH COMMENT IT WILL HELP A LOT.

DO NOT USE ANY OTHER MODULE THAN "COPY" AND "MATH"image text in transcribed

Write a function defined as: def GaussElimVector(A,B) Purpose: use the Gauss Elimination method to solve the set of linear equations encoded in A and B Important: Gauss elimination of often presented for problems in the form Ax-b, where A is a square coefficient matrix, b is a single column vector containing right-hand-side values and x is a single column vector that will contain the solution. In this assignment, B can contain multiple columns of differing right-hand-side values. The solution variable -x- will contain multiple solutions corresponding the different columns of B. This is a very simple modification to the single-rhs Gaus:s Elimination algorithm A. a coefficient matrix of size N x N, coming from an equation set: A = B, where N is the number of equations in the set B: a matrix containing multiple right hand side vectors. The size is N x M where M is the number of right-hand-side columns. return value: x - a matrix the same size of B, containing the solution to Ax-B To test your function, write and call a def main) that creates an A and B matrix, call:s GaussElimVector, and prints the solution. Use the A and B given below to demonstrate that your function gets the correct answer. Put all of this in a file named GaussElim.. 3 3 4 4 6 9 5 3 4 2 1 7 2 -1 2 6 2 -5 3 -3 7 Notes: Do NOT use partial pivoting in this program. (I want everyone to get the exact same answer, and I don't want you working quite that hard Write a function defined as: def GaussElimVector(A,B) Purpose: use the Gauss Elimination method to solve the set of linear equations encoded in A and B Important: Gauss elimination of often presented for problems in the form Ax-b, where A is a square coefficient matrix, b is a single column vector containing right-hand-side values and x is a single column vector that will contain the solution. In this assignment, B can contain multiple columns of differing right-hand-side values. The solution variable -x- will contain multiple solutions corresponding the different columns of B. This is a very simple modification to the single-rhs Gaus:s Elimination algorithm A. a coefficient matrix of size N x N, coming from an equation set: A = B, where N is the number of equations in the set B: a matrix containing multiple right hand side vectors. The size is N x M where M is the number of right-hand-side columns. return value: x - a matrix the same size of B, containing the solution to Ax-B To test your function, write and call a def main) that creates an A and B matrix, call:s GaussElimVector, and prints the solution. Use the A and B given below to demonstrate that your function gets the correct answer. Put all of this in a file named GaussElim.. 3 3 4 4 6 9 5 3 4 2 1 7 2 -1 2 6 2 -5 3 -3 7 Notes: Do NOT use partial pivoting in this program. (I want everyone to get the exact same answer, and I don't want you working quite that hard

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

Discuss five types of employee training.

Answered: 1 week ago

Question

Identify the four federally mandated employee benefits.

Answered: 1 week ago