0% found this document useful (0 votes)
27 views

Programming Assignment I

The document provides instructions for a programming assignment to write a program that solves systems of linear equations using Gauss elimination. The program should: 1) Allow flexible system size as input and include right-hand sides in an augmented matrix. 2) Choose between solving systems or inverting matrices by augmenting unit vectors. 3) Incorporate partial pivoting and output L and U matrices of the Doolittle method. 4) Read inputs and output solutions to files with descriptions. 5) Use modular programming with separate functions.

Uploaded by

Robert J. Vaodra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Programming Assignment I

The document provides instructions for a programming assignment to write a program that solves systems of linear equations using Gauss elimination. The program should: 1) Allow flexible system size as input and include right-hand sides in an augmented matrix. 2) Choose between solving systems or inverting matrices by augmenting unit vectors. 3) Incorporate partial pivoting and output L and U matrices of the Doolittle method. 4) Read inputs and output solutions to files with descriptions. 5) Use modular programming with separate functions.

Uploaded by

Robert J. Vaodra
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ESO 218: Computational Methods in Engineering

Programming Assignment I Date of Circulation: 30.01.2011 Evaluation starts after: 7.02.2011

Write a program (using C or MATLAB) for the solution of a system of linear equations using Gauss Elimination. The program should have the following features: The size of the system should be flexible and an input parameter. Incorporate the right hand side vector(s) in an augmented matrix. Number of right hand side vector(s) should be an input parameter. Program should ask for an option in the beginning, whether to obtain a solution or to invert the matrix. If inversion is chosen, it should automatically augment appropriate numbers of unit column vectors. Incorporate partial pivoting. Synthesize L and U matrices of the Doolittles method. Size of the system and the augmented matrix should be read from an input file (not from the terminal). The solution should be exported to an output file. The output file should be in a well laid out format incorporating appropriate text descriptions. For example, it may include the solution vector(s) with appropriate identifier(s) for each corresponding right hand side vector(s) (or inverse, if chosen), L matrix, U matrix, etc. Use modular programming concept. For example, you may write separate functions for synthesis of augmented matrix, carrying out partial pivoting, carrying out forward elimination, synthesis of LU decomposition and computation of solution using back substitution. Call these functions in a master program to achieve the objective.

Evaluation: You have to compile and run the program in the presence of a TA with the data supplied by the TA. Make sure you test all features of your program with at least 3 to 4 different sets of data (of different sizes) before coming for the evaluation. At the time of evaluation, submit a soft copy of the program that is being run. If multiple copies of the same program are found, all the copies will receive ZERO.

You might also like