Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Português

Change language to:
English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 2024.1.0. This page might be outdated.
See the recommended documentation of this function

Ajuda do Scilab >> Estatística > Central Tendency > harmean


harmonic mean

Calling Sequence

hm=harmean(x,'r')(or, equivalently, hm=harmean(x,1))
hm=harmean(x,'c')(or, equivalently, hm=harmean(x,2))



real or complex vector or matrix


This function computes the harmonic mean of a vector or matrix x. For a vector or matrix x, hm=harmean(x) returns in scalar hm the harmonic mean of all the entries of x.

hm=harmean(x,'r') (or, equivalently, hm=harmean(x,1) ) returns in each entry of the row vector hm the harmonic mean of each column of x.

hm=harmean(x,'c') (or, equivalently, hm=harmean(x,2) ) returns in each entry of the column vector hm the harmonic mean of each row of x.


harmean(1:10) // Returns 10/sum(1 ./(1:10)) ~ %pi


Wonacott, T.H. & Wonacott, R.J.; Introductory Statistics, fifth edition, J.Wiley & Sons, 1990.

Report an issue
<< geomean Central Tendency mean >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:18:13 CEST 2014