Computes arithmetic mean.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x(:) |
x vector (assumed size array) |
arithmetic mean
pure function f_sts_mean_core(x) result(mean) ! ==== Description !! Computes arithmetic mean. ! ==== Declarations real(wp), intent(in) :: x(:) !! x vector (assumed size array) real(wp) :: mean !! arithmetic mean ! ==== Instructions mean = sum(x) / real(size(x), kind=wp) end function f_sts_mean_core