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
Get step-by-step solutions from verified subject matter experts
