The geometric mean of a set of numbers x1 through xn is


Using Matlab perform the following:

The geometric mean of a set of numbers x1 through xn is defined as the nth root of the product of numbers:
Geometric mean = (x1*x2A????1xn)1/n

Write a function file that will accept an arbitrary number of positive input values and calculate the average and the geometric mean of the numbers. Use a while loop to get the input values and terminate the input if the user inputs a negative number. Test your program by calculating the average and geometric mean of the four numbers 2,3,4 and 5.

Request for Solution File

Ask an Expert for Answer!!
Mechanical Engineering: The geometric mean of a set of numbers x1 through xn is
Reference No:- TGS01480168

Expected delivery within 24 Hours