The goal of your problem is to write an m-file that generates a table in a text
Question:
The goal of your problem is to write an m-file that generates a table in a text file with the trace of A × A† for a matrix A with the entries
You must use for loops to (i) create the matrix A, (ii) construct the transpose A†, (iii) compute the product A × A†, and (iv) compute the trace of A × A†. Do this calculation for all 9 combinations of matrix dimensions 10, 100, and 1000 (i.e., where A is 10 × 10, 10 × 100, 10 × 1000, 100 × 10, etc.). For the output, create a 9 × 3 matrix where the first column is the number of rows in A, the second column is the number of columns in A, and the third column is the trace of A × A† for these conditions. Your program should write this matrix to a text file using the MATLAB routine dlmwrite. You should only have to run your program once to generate the entire output file.
Step by Step Answer:
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis