Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a vector!
Solution Stats
Problem Comments
4 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers66
Suggested Problems
-
Sum of diagonal of a square matrix
1642 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
652 Solvers
-
Find out value of sine given by degree.
357 Solvers
-
Finding an element in a vector
206 Solvers
-
Height of a right-angled triangle
2073 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Wrong Solution for Test Case 3. Value of Harmonic Mean and Geometric mean are not the value which should come. Please change
Hello Rathin Joshi.
I checked numbers and I think they are correct. The geometric mean should be (10!)^(1/10) and the harmonic mean should be 10/10th harmonic number.
It seems that the numerical error is too large and the answer I got is not identical to the correct answer.
The last test case has been improved.