covspectro(wave1, wave2, f, wl = 512, wn = "hanning", n,
plot = TRUE, plotval = TRUE,
method = "spearman", col = "black", colval = "red", cexval = 1,
fontval = 1, xlab = "Time (s)",
ylab = "Normalised covariance (cov)", type = "l", ...)
wave1
and wave2
(in Hz).
Does not need to be specified if wave1
and/or wave2
are/is
of class ts
, Sample
, or ftwindow
(by default "hanning"
).wave1
and wave2
when sliding wave2
along wave1
.TRUE
plots r values against frequency shift
(by default TRUE
).TRUE
adds to the plot maximum R value
and frequency offset (by default TRUE
).cor
).plot
is TRUE
, type of plot that should be drawn.
See plot
for details (by default "l" for lines).plot
graphical parameters.plot
is FALSE
, covspectro
returns a list containing
three components:wave1
and wave2
.wave1
and wave2
.cov
.wave1
and
the spectrogram of wave2
are computed when regularly sliding
forward and backward wave2
along wave1
.
The maximal covariance is obtained at a particular shift (time offset).
This shift may be positive or negative.
n
sets in how many steps wave2
will be slided along wave1
.
Time process can be then decreased by setting low n
value.
Inverting wave1
and wave2
may give slight different results.corspec
, corenv
, spectro
,
cor
,# covariance between two notes of a birdsong
data(tico)
note1<-cutw(tico, f=22050, from=0.5, to=0.9)
note2<-cutw(tico, f=22050, from=0.9, to=1.3)
covspectro(note1,note2,f=22050,n=37)
Run the code above in your browser using DataLab