Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need help with the second code ( thomas algorithm ) please do using C++, provided below are all the information related to thomas algorithm.
i need help with the second code ( thomas algorithm ) please do using C++, provided below are all the information related to thomas algorithm. please let me know if additional information is needed.
For this assignment, you will need to write two codes. For the first, you will implement Gaussian Elimination in the manner it was presented in class. Do not use other formulations or methods Your program should accept a matrix, A, of arbitrary size up to 10 x 10, either by reading it from a file or from the keyboard at runtime. (Hint: Reuse the relevant portions of your code from the first assignment.) Your matrix may not be hardcoded. Likewise, your code should accept a column vector. b. Then your matrix must be passed to one or more subroutines that return the solution to Ax = b to the main program. Use your code to solve the two following matrix systems Do not use pivoting 4.678.483.51 2.31 6.62 3.014.84 3.554.47 6.87 6.083.42 0.15 9.24 5.04 1.486.84 3.01 1.96 3.67 3.34 4.88 1.458.45 5.61 4.41 4.42 3.33 5.67 4.15 8.585.41 5.84 3.20 9.60158 9.311.491.967.447.2188 3.39 5.66 8.61 9.44 1.13623 4.286.65 5.567.25 8.714.14 9.627.538.047.09 9.55 3 30 For your second code, implement Thomas' algorithm. This code should function in the same manner as the Gaussian Elimination code, and the algorithm must be in its own subroutine and called from the main program. Use this code to solve the following systems of equations 4.67 8.480 3.014.84 3.550 4.41 4.42 3.33 5.67 4.15 8.58 5.410 9.31 1.491.960 1.58 0.88 6.23 5.56 7.258.71 4.14 7.09 9.553.30 3.42 0.159.240 5.66|8.61 9.440 3.01 1.96 3.67 8.45 5.61 For this assignment, you will need to write two codes. For the first, you will implement Gaussian Elimination in the manner it was presented in class. Do not use other formulations or methods Your program should accept a matrix, A, of arbitrary size up to 10 x 10, either by reading it from a file or from the keyboard at runtime. (Hint: Reuse the relevant portions of your code from the first assignment.) Your matrix may not be hardcoded. Likewise, your code should accept a column vector. b. Then your matrix must be passed to one or more subroutines that return the solution to Ax = b to the main program. Use your code to solve the two following matrix systems Do not use pivoting 4.678.483.51 2.31 6.62 3.014.84 3.554.47 6.87 6.083.42 0.15 9.24 5.04 1.486.84 3.01 1.96 3.67 3.34 4.88 1.458.45 5.61 4.41 4.42 3.33 5.67 4.15 8.585.41 5.84 3.20 9.60158 9.311.491.967.447.2188 3.39 5.66 8.61 9.44 1.13623 4.286.65 5.567.25 8.714.14 9.627.538.047.09 9.55 3 30 For your second code, implement Thomas' algorithm. This code should function in the same manner as the Gaussian Elimination code, and the algorithm must be in its own subroutine and called from the main program. Use this code to solve the following systems of equations 4.67 8.480 3.014.84 3.550 4.41 4.42 3.33 5.67 4.15 8.58 5.410 9.31 1.491.960 1.58 0.88 6.23 5.56 7.258.71 4.14 7.09 9.553.30 3.42 0.159.240 5.66|8.61 9.440 3.01 1.96 3.67 8.45 5.61Step 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