swh:1:snp:3a44eb759780145deea094ac2a25c5049546a085
Tip revision: 3e4543e3bb2cf12453819b88fbea61ccaf2a1ef5 authored by Han Lin Shang on 23 April 2020, 04:50:02 UTC
version 5.6
version 5.6
Tip revision: 3e4543e
FlatTop.R
FlatTop <- function(x)
{
out <- 0
if(x < 0.5)
{
out <- 1
}
else if(x >= 0.5 && x <= 1)
{
out <- 2 - 2*x
}
else
{
out <- 0
}
return(out)
}