Question: Use MATLAB to solve the following problems. (a) Create a random integer between 0 and 10. (b) Create a vector of 1000000 random integers between

Use MATLAB to solve the following problems.

(a) Create a random integer between 0 and 10.

(b) Create a vector of 1000000 random integers between 0 and 10 and compute the average of those 100 numbers. Measure the time needed for this code to run.

(c) Compute the average of 1000000 integers between 0 and 10, without allocating the memory for 100 different numbers. Measure the running time. (Hint: you can use for loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!