Santiago Barreda
Assistant Professor, Department of Linguistics, UC Davis

Main Research Vignettes CV phonTools Statistics Links

 


peakfind [phonTools]

 

This function finds all points in a vector whose values are greater than those of the points before and after. To find the lowest points in the vector, multiplie the input by -1.   

 

 

Code used to generate examples:


library (phonTools) ## generate slowly-varying noise noise = rnorm (500, 0, 1) noise = FIRfilter (noise, from = 0, to = 50,fs = 1000) ## plot signal and the detected peaks par (mfrow = c(3,1), mar = c(4,4,1,1)) plot (noise, type = 'l') peakfind (noise) peakfind (-noise)