geomean
Geometric mean
Syntax
Description
returns
the geometric mean of
m
= geomean(X
)X
.
If
X
is a vector, thengeomean(X)
is the geometric mean of the elements inX
.If
X
is a matrix, thengeomean(X)
is a row vector containing the geometric mean of each column ofX
.If
X
is a multidimensional array, thengeomean
operates along the first nonsingleton dimension ofX
.
specifies whether to exclude m
= geomean(___,nanflag
)NaN
values from the calculation, using any
of the input argument combinations in previous syntaxes. By default,
geomean
includes NaN
values in the calculation
(nanflag
has the value 'includenan'
). To exclude
NaN
values, set the value of nanflag
to
'omitnan'
.