Write a computer program for solving a system of linear equations Ax=b. The program should have...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a computer program for solving a system of linear equations Ax=b. The program should have the following features: Input: The program should read the following inputs from a text file-(i) the number of equations (n), (ii) elements of the augmented matrix. [Please see an example of input data file below]. Options: The user should have the option of selecting one of the following methods- a. Gauss elimination (GE; without pivoting) b. GE (with pivoting) c. GE (with scaling and pivoting) d. LU decomposition by using GE (without pivoting) e. LU decomposition by using GE (with pivoting) f. LU decomposition by using Crout method (without pivoting) Output: The output from the program should be written in a text file. This file should contain the following results for different methods- a. GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of U b. LU by GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of L and U c. LU by Crout method: the unknowns x and the elements of L and U Write a computer program for solving a system of linear equations Ax=b. The program should have the following features: Input: The program should read the following inputs from a text file-(i) the number of equations (n), (ii) elements of the augmented matrix. [Please see an example of input data file below]. Options: The user should have the option of selecting one of the following methods- a. Gauss elimination (GE; without pivoting) b. GE (with pivoting) c. GE (with scaling and pivoting) d. LU decomposition by using GE (without pivoting) e. LU decomposition by using GE (with pivoting) f. LU decomposition by using Crout method (without pivoting) Output: The output from the program should be written in a text file. This file should contain the following results for different methods- a. GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of U b. LU by GE: the unknowns x, the permutation matrix (if pivoting is done), and the elements of L and U c. LU by Crout method: the unknowns x and the elements of L and U
Expert Answer:
Answer rating: 100% (QA)
Ill provide you with a Python program that reads the input from a text file solves a system of linear equations using various methods and writes the r... View the full answer
Related Book For
Elementary Principles of Chemical Processes
ISBN: 978-0471720638
3rd Edition
Authors: Richard M. Felder, Ronald W. Rousseau
Posted Date:
Students also viewed these programming questions
-
Zelda Corporation estimates that direct labour-hours will be 5,000, direct machine- hours will be 3,500, and indirect manufacturing costs (costs that will be impossible or difficult to trace to a...
-
How much will $106 become if discounted 9% per year for 6 years? Enter your answer as a number with four decimal places but without the currency symbol, like this: 90.1234 Type your answer...
-
A stirred tank with volume V t? (L) is charged with V 1 (L) of a liquid. B. The space above the liquid (volume V g = V t ? V 1 ) is filled with a pure gas, A, at an initial pressure P 0 (atm). The...
-
Golf ball manufacturer Trevino is generally regarded as the industry leader. It commands a 40 percent market share in its targeted channels of distribution and reported net profits of $31.5 million...
-
Why should taxpayers subsidize public colleges and universities? What external benefits are generated by higher education?
-
Information for an accrual basis corporation Net income per books (after-tax)........................................... $174,100 Federal income tax expense per...
-
Identify at least three ways you can obtain information about the location of the debtors assets.
-
A truck loaded with cannonball watermelons stops suddenly to avoid running over the edge of a washed-out bridge (Fig. P4.64). The quick stop causes a number of melons to fly off the truck. One melon...
-
Question 3 :The following quotes are available for the Brazilian Real vs. US dollar: Spot exchange rate: R$ 4.0811/$ Six month forward rate: R$ 3.8000 /$ Six month US interest rate: 2% per year Six...
-
An engineer has a DAQ with a 14-bit A/D converter and a voltage range of 0 to 10 V. They are measuring vibrations around 20 Hz, so they sample at f= 100 Hz to avoid aliasing. They add a DC offset of...
-
You are a sole practitioner who used to provide a range of accountancy services for a small company (Company A) that owns a hardware shop in the town where you practice. Following a brief retendering...
-
This is a terrific sequel to the initial reboot of the Star Trek motion picture series. Analyze Captain Kirks (Chris Pine) leadership style. Does he adapt to the situation by changing his style to...
-
What produces group polarization?
-
Is parliamentary procedure always a useful way to conduct group meetings?
-
What is meant by leadership is a process not a person?
-
How do roles emerge in small groups?
-
Assuming the operating system detects the system is deadlocked, what can the operating system do to recover from deadlock?
-
State whether each statement is true or false. If false, give a reason. {purple, green, yellow} = {green, pink, yellow}
-
Liquid water is fed to a boiler at 24C and 10bar and is converted at constant pressure to saturated steam. Use the steam tables to calculate H (kJ/kg) for this process, and then calculate the heat...
-
A cylinder with a movable piston contains 4.00liters of a gas at 30C and 5.00bar. The piston is slowly moved to compress the gas to 8.00bar. (a) Considering the system to be the gas in the cylinder...
-
Sketch the plots described below and calculate the equations for y(x) from the given information. The plots are all straight lines, Note that the given coordinates refer to abscissa and ordinate...
-
For the Scotch yoke mechanism shown in Fig.3.27, find the velocity and acceleration of point \(B\). \(\omega_{2}=5 \mathrm{rad} / \mathrm{s}\), and \(O_{2} A=100 \mathrm{~mm}\). 2 45 3 .B. Scale: 1...
-
In Example 3.14 , calculate analytically, the acceleration of the piston and angular acceleration of the rod.
-
The crank of an engine \(300 \mathrm{~mm}\) long rotates at a uniform speed of \(300 \mathrm{rpm}\). The ratio of connecting rod length to crank radius is 4 . Determine (a) acceleration of the...
Study smarter with the SolutionInn App