Learn R Programming

rdetools (version 1.0)

sinc: Calculate sinc values

Description

Calculates (normalized) sinc values for each element of a vector/matrix/... etc., $$sinc(x) = \frac{sin(\pi x)}{\pi x}, x \neq 0$$ If $x = 0, sinc(x)$ is defined as $1$ (removable singularity in zero).

Usage

sinc(X)

Arguments

X
an arbitrary vector/matrix/... containing numbers

Value

an vector/matrix/... of same size as the argument containing the sinc values for each element

References

http://en.wikipedia.org/wiki/Sinc\_function

See Also

sincdata

Examples

Run this code
## calculate sinc values of a vector
v <- 1:10
sinc(v)

Run the code above in your browser using DataLab