Boxcar function.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | x |
argument |
||
real(kind=rk), | intent(in) | :: | a |
interval limit |
||
real(kind=rk), | intent(in) | :: | b |
interval limit |
||
real(kind=rk), | intent(in) | :: | height |
pulse height |
elemental real(rk) function boxcar(x, a, b, height) result(res) !! Boxcar function. real(rk), intent(in) :: x !! argument real(rk), intent(in) :: a, b !! interval limit \( a < b \) real(rk), intent(in) :: height !! pulse height res = ZERO if (x > a .and. x < b) res = height end function boxcar