Question: You are to write a computer program that will accept as input from the screen or read from a file two square matrices of arbitrary


You are to write a computer program that will accept as input from the screen or read from a file two square matrices of arbitrary size less than or equal to 10, and conduct basic operations upon them. The matrices must be multiplied (full matrix multiplication, not element-by-element) and added. Furthermore, you must calculate the L2 norm (or Erobenius norm) and the determinant for each matrix. Do not include any other operations. Each operation must be contained within its own subroutine or function, and the input matrices passed to the subroutine or function as appropriate. For each operation, the resulting matrix or result must be formatted and written to a file that you will turn in. The original matrices must also be written to your output file Screenshots or files that have been "cleaned-up" using Word or other software are not acceptable. For printing, I suggest loading your file into WordPad. For this assignment, the definition of formatted" means that each matrix row and column must be evenly spaced so as to be legible without excessive white space (i.e. no blank lines between rows, and no more than 3 spaces between columns). Also, each value in the matrices and results should have exactly two significant decimal figures, including any trailing zeros, and decimal points must be aligned in the matrices. In your file, it should be clear what each matrix or result is, so you will need to include additional print/write statements for that purpose The input matrices are on the next page. These matrices and their size must be entered from the keyboard or read from a file. They cannot be hard coded into your program. You may choose any computer language you prefer (except Python) provided you are not using a commercial or other pre-written application to do the work for you (MATLAB, Mathematica, Excel, and other available software are not acceptable) While working in small groups to set up the problem and determine how to solve it is acceptable, all code must be original work. Code that is copied or substantially similar to other students' work (past or present) will be rejected and no credit for the assignment received. You are to write a computer program that will accept as input from the screen or read from a file two square matrices of arbitrary size less than or equal to 10, and conduct basic operations upon them. The matrices must be multiplied (full matrix multiplication, not element-by-element) and added. Furthermore, you must calculate the L2 norm (or Erobenius norm) and the determinant for each matrix. Do not include any other operations. Each operation must be contained within its own subroutine or function, and the input matrices passed to the subroutine or function as appropriate. For each operation, the resulting matrix or result must be formatted and written to a file that you will turn in. The original matrices must also be written to your output file Screenshots or files that have been "cleaned-up" using Word or other software are not acceptable. For printing, I suggest loading your file into WordPad. For this assignment, the definition of formatted" means that each matrix row and column must be evenly spaced so as to be legible without excessive white space (i.e. no blank lines between rows, and no more than 3 spaces between columns). Also, each value in the matrices and results should have exactly two significant decimal figures, including any trailing zeros, and decimal points must be aligned in the matrices. In your file, it should be clear what each matrix or result is, so you will need to include additional print/write statements for that purpose The input matrices are on the next page. These matrices and their size must be entered from the keyboard or read from a file. They cannot be hard coded into your program. You may choose any computer language you prefer (except Python) provided you are not using a commercial or other pre-written application to do the work for you (MATLAB, Mathematica, Excel, and other available software are not acceptable) While working in small groups to set up the problem and determine how to solve it is acceptable, all code must be original work. Code that is copied or substantially similar to other students' work (past or present) will be rejected and no credit for the assignment received
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
