R/sinc.R

# Copyright (c) 2015 Santiago Barreda
# All rights reserved.


sinc = function (x, normalized = FALSE){ 
  if (normalized == FALSE) output = sin(x)/x  
  if (normalized == TRUE) output = sin(x*pi)/(x*pi)  
  output[x==0] = 1
  output
}

Try the phonTools package in your browser

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

phonTools documentation built on Nov. 21, 2023, 1:07 a.m.