Calculating the average and geometric mean of the four

Assignment Help Mechanical Engineering
Reference no: EM131102166

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.

Reference no: EM131102166

Questions Cloud

Centralized private sector planning : What does the CPSP (Centralized Private Sector Planning) thesis say about the difference between the modern industrial economy and Adam Smith s economy?
Description of implementation logistics : Description of current problem, issue, or deficit requiring a change - Description of implementation logistics
Creating sustainable and effective supply and demand network : Economists argue that successful business depends on creating sustainable and effective supply and demand networks. If you own (manage) a business, how do you create effective demand and effective supply to maximize profit?
What is absolute advantage : What is absolute advantage? What is comparative advantage? How do differences in geography influence the differences in absolute advantages? Can a nation’s comparative advantage change over time? What factors would make it change?
Calculating the average and geometric mean of the four : 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
How trade barriers save jobs in protected industries : Explain how a subsidy on agricultural goods like sugar adversely affects the income of foreign producers of imported sugar. Explain how trade barriers save jobs in protected industries, but only by costing jobs in other industries.
Calculate the work done by the steam : Calculate the heat supplied and change of entropy and show the process on a T-s diagram, indicating the area which represents the heat flow.
Define marginal product of factors : Define marginal product of factors K and L in the production function Y = F (K, L).
Application of concept of income elasticity of demand : Give a clear answer to this question; Define and give an example of application of concept of income elasticity of demand: of cross price elasticity of demand.

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  A 60 g bullet moving with a speed of 500 ms strikes a 5 kg

a 60 g bullet moving with a speed of 500 ms strikes a 5 kg block moving in the same direction with a speed of 30 ms. if

  The vessel is placed at time t0 into a thermal reservoir

a mixture of vapor and liquid water with mass of m.1kg is contained in a rigid glass vessel with an initial temperature

  A fenced enclosure consists of a rectangle of length l and

a fenced enclosure consists of a rectangle of length l and width 2r and a semicircle of radius r as shown in figure

  As the load on the motor is increased the developed torque

a 115-v shunt motor develops 21 ib-ft when the armature current is 12 a. as the load on the motor is increased the

  Determine the power generation potential

Electric power is to be generated by installing a hydraulic turbine-generator at a site 120m below the free surface of a large water reservoir that can supply water at a rate of 1500 kg/s steadily. Determine the power generation potential.

  Compressor is employed to compress gas

A compressor is employed to compress gas flowing steadily through it. The gas enters the compressor at a temperature of 16°C, a pressure of 100 kPa, and with an enthalpy of 391.2 kJ/kg. The gas leaves the compressor at a temperature of 245°C, a pre..

  If the volumetric flow rate of the air stream is 80 m3min

atmospheric air at 95 kpa 30 degrees celcius and 75 humidity is to be conditioned at constant pressure so that it

  Determine the surface temperature of the top of the puck

consider an nhl regulation hockey puck 3 inches in diameter and 1 inch thick 7.62 cm by 2.54 cm. determine the surface

  Determine the atomic hydrogen to carbon ratio of the fuel

A new liquid fuel with formula CHz is proposed for use in spark-ignition engines. To determine the fuel properties, a sample of fuel at 25 degress C was placed in a constant volume bomb calorimeter. Oxygen at 25 degress C was admitted to the bomb and..

  What is the rate of heating of the cooler

What is the rate of heating of the cooler?

  Assume material is isontropic-even and loading is uniaxial

What is a typical direction of failure plane w.r.t  the direction of loading axis when a ductile material is loaded under A) Axial loading only B) Compressive loading only. C) Torsional loading only (Assume material is isontropic and even and loading..

  Method available-australia to protect intellectual property

Prepare a report on the various types of methods available in Australia to protect intellectual property - The strategy's main items should include what to protect, what countries to protect it in, how to protect it, and when to seek protection

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd