R/FlatTop.R

Defines functions FlatTop

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)
}

Try the ftsa package in your browser

Any scripts or data that you put into this service are public.

ftsa documentation built on May 29, 2024, 2:47 a.m.