
Last chance! 50% off unlimited learning
Sale ends in
zc(wave, f, plot = TRUE, interpol = 1, threshold = FALSE,
xlab = "Time (s)", ylab = "Frequency (kHz)", ylim = c(0, f/2000),...)
wave
.TRUE
plots the dominant frequency along
the time wave(by default TRUE
).plot
graphical parameters.plot
is FALSE
, zc
functions returns a vector of numeric data.
Values corresponds to the instantaneous frequency of the time wave. threshold
or
sections of the time wave not corrsing the zero line. To remove na.omit
allows to get only instantaneous frequency values but
discards information about pause sections.plot
is FALSE
, zc
returns a vector of numeric data with
the instantaneous frequency.data(pellucens)
pellu1<-cutw(pellucens,f=22050,from=0,to=1,plot=FALSE)
# without interpolation
zc(pellu1,f=22050,threshold=5,pch=20)
# with interpolation
zc(pellu1,f=22050,threshold=5,interpol=20,pch=20)
# a way to plot with a line and to filter low frequencies
pellu2<-zc(pellu1,f=22050,threshold=5,interpol=20,plot=FALSE)
pellu3<-na.omit(pellu2)
pellu4<-pellu3[pellu3>3]
plot(x=seq(0,nrow(pellu1)/22050,length.out=length(pellu4)),
y=pellu4,type="l",xlab="Time(s)",ylab="Frequency(kHz)")
Run the code above in your browser using DataLab