rect: rectangle function

Description Usage Arguments Value Examples

Description

produces a discontinuous function which is zero everywhere except within [a,b]

Usage

1
rect(x, a, b, z)

Arguments

x

variable

a

left bound

b

right bound

z

Height of the rectangle

Value

function evaluation of x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, a, b, z)
{
    result = z * (Heaviside(x = x, x0 = a) - Heaviside(x = x,
        x0 = b))
    return(result)
  }

PhilippVWC/myBayes documentation built on Oct. 2, 2020, 8:25 a.m.