Question: 25 points Nested loop question 1. (5 points) Ask the user to enter the dimensions of a 2D matrix. With these inputs, use rand) to
25 points Nested loop question 1. (5 points) Ask the user to enter the dimensions of a 2D matrix. With these inputs, use rand) to create a 2D matrix of random values using the sizes input by the user. For example, you get two numbers 3 and 4 from Command Window, you then generate a random matrix of size 3x4 with command rande) 1 2. (12 points) Use the nested for loops to process each element of the matrix you generate from (1) to find the smallest, largest, and average values in the matrix. (You will not get credit if you use Matlab built-in function to compute the values) 3. (8 points) Test your script for row = 5 and column = 6. Output the results in the following format: The random value matrix A is: 0.3196 0.7184 0.6110 0.1537 0.8754 0.2407 0.5309 0.9686 0.7788 0.2810 0.5181 0.6761 0.6544 0.5313 0.4235 0.4401 0.9436 0.2891 0.4076 0.3251 0.0908 0.5271 0.6377 0.6718 0.8200 0.1056 0.2665 0.4574 0.9577 0.6951 The minimum value of matrix Ais: 0.0908 The maximum value ot matrix Als: 0.9686 The average value of matrix is 0.5306
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
