Question: Plz write the code only using MATLAB Create a program called LoopCompare.m that: Ask the user for the number of elements in a vector. Creates

Plz write the code only using MATLAB
Create a program called LoopCompare.m that: Ask the user for the number of elements in a vector. Creates a vector of random integers from 1 - 100. For the same vector: (1) Use a for loop to compute the average of the elements (2) Use a while loop to compute the average of the elements (3) Use the mean command Display the results of each in the Command Window
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
