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

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

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!