Question: Design Statement: Write a MATLAB script that will demonstrate the differences between matrix and array addition and multiplication. 8. Write the pseudocode OR create a
Design Statement: Write a MATLAB script that will demonstrate the differences between matrix and array addition and multiplication. 8. Write the pseudocode OR create a flowchart for the entire script BEFORE starting to program. 9. The script must adhere to the following guidelines: a. Be fully commented, including a comment block at the end of the code that includes the pseudocode that you wrote before starting to write the program. b. Allow the user to input the dimension for square matrices to be used throughout the remainder of the program. The value for the dimension must be greater than 3 and less than or equal to 25. (This value will be referred to as n for the remainder of the Design Statement.) c. Generate the following n x n arrays i. primeMat: An array of sequential prime numbers (Hint: Use the lookfor command.) ii. randMat: An array of random integers between n and 10n d. Demonstrate that matrix and array addition are identical by adding primeMat and randMat and.. i. Outputting the first 3 rows and 4 columns of the resulting matrix for each operation. ii. Outputting the average and total value of all elements in the resulting matrix for each operation e. Demonstrate that matrix and array multiplication are different by multiplying primeMat and i. Outputting the first 3 rows and 4 columns of the resulting matrix for each operation. i. Outputting the average and total value of all elements in the resulting matrix for each randMat and... operation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
