Function to calculate the coefficient of variation of a real array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(inout), | dimension(:) | :: | a |
A real array |
A real variable with the calculated coefficient of variation
function coefficient_of_variation(a) result(cov) !============================================================================================ !! Function to calculate the coefficient of variation of a real array real(kind=wp),dimension(:),intent(inout) :: a !! A real array real(kind=wp) :: cov !! A real variable with the calculated coefficient of variation cov=std(a)/mean(a); end function coefficient_of_variation