Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please , just need to do the C++ programming , thanks Systems of Linear Equations The currents I1,I2,I3, and I4 that flow through an electrical
please , just need to do the C++ programming , thanks
Systems of Linear Equations The currents I1,I2,I3, and I4 that flow through an electrical circuit are modelled by Kirchhoff's law 4I1+2I2+4I3I4=1I1+3I24I3+2I4=2I1+I27I33I4=3I1+2I2I3+2I4=29393323 Solve the system of linear equations using: a) Nave Gaussian elimination (manual calculations, single precision). b) Gaussian elimination with scaled partial pivoting (manual calculations, single precision). c) Write a C++ program based on the pseudocode of the Nave Gaussian method. Nave Gaussian p270, p252 Legend: - For the matrix multiplication Ax=b - n is the number of equations - aij is the matrix A with i rows and j columns - xi is vector x (one column) with i rows of the unknown currents - bi is vector b (one column) with i rows of the free terms Use single precision (6 significant digits) for manual calculations Examples: - For questions a, and b Perform hand calculations Record the answers in the shaded boxes of the provided Excel file (see the example) Scan the hand calculations Submit on Avenue the scanned hand calculations in a single file - For question c) Create a C++ source file with a main program that calls a separate function called "naiveGauss" using the pseudocode shown above. For n=4, populate the known matrices A[5][5]={{0,0,0,0,0}, {0,4,2,4,1},{0,.}..{0,.},.{0,.}.}andb[5]={0,20,39,}, and define the unknowns x[5]. The naiveGauss function will have four parameters: will get from main n, the two-dimensional matrix a and the matric b and will pass back the matrix x. Display on main() the four results x [1] ...x[4] Run the program to get the values of the currents I1,I2,I3, and I4 Write the values of the four currents in the shaded box of the provided Excel file Paste in the Excel file a picture of your C++ program output (console); without a picture proof, the answer to C++ question will not be credited Submit on Avenue the C++ source file.cpp (not the solution file .sln!). - Submit on Avenue the Excel file with your answersStep 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