Function to calculate the standard deviation 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 standard deviation
function std(a) result(s) !============================================================================================= !! Function to calculate the standard deviation of a real array real(kind=wp),dimension(:),intent(inout) :: a !! A real array real(kind=wp) :: s !! A real variable with the calculated standard deviation real(kind=wp) :: v ! v=variance(a); s=sqrt(v); ! end function std