Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions