The harmonic mean H of a set of n positive numbers x1, x2,..., xn, is defined by:
H
=
n
1
x
1
+
1
x
2
+
...
+
1
x
n
Write a user-defined function that calculates the harmonic mean of a set of numbers. For function name and arguments use G=Harmean (x) where the input argument x is a vector of numbers (any length) and the output argument H is their harmonic mean. In electrical engineering the equivalent resistance of resistors connected in parallel is equal to the harmonic mean of the values of the resistors divided by the number of the resistors. Use the user-defined function Harmean to calculate the equivalent resistance of the resistors shown in the figure.