
simspec(spec1, spec2, f = NULL, plot = FALSE, type = "l",
lty1 = 1, lty2 = 2,
lty3 = 3, col1 = 2, col2 = 4, col3 = 1, flab = "Frequency (kHz)",
alab = "Amplitude (percentage)", flim = c(0, f/2000),
alim = c(0, 100),
legend = TRUE, ...)
spec1
and spec2
(in Hz). Not necessary if spec1
and/or spec2
is a two columns matrix obtained with spec
TRUE
plots both spectra and similarity function
(by default FALSE
).plot
is TRUE
, type of plot that should be drawn.
See plot
for details (by default "l" for lines).spec1
if type
="l".spec2
if type
="l".type
="l".spec1
.spec2
.TRUE
adds a legend to the plot.plot
graphical parameters.plot
is TRUE
, both spectra and the similarity function are
plotted on the same graph. The similarity index is the mean of this function.spec
, meanspec
, corspec
,
diffspec
, diffenv
a<-noise(f=8000,d=1)
b<-synth(f=8000,d=1,cf=2000)
c<-synth(f=8000,d=1,cf=1000)
d<-noise(f=8000,d=1)
speca<-spec(a,f=8000,at=0.5,plot=FALSE)
specb<-spec(b,f=8000,at=0.5,plot=FALSE)
specc<-spec(c,f=8000,at=0.5,plot=FALSE)
specd<-spec(d,f=8000,at=0.5,plot=FALSE)
simspec(speca,speca)
simspec(speca,specb)
simspec(speca,specc,plot=TRUE)
simspec(specb,specc,plot=TRUE)
#[1] 12.05652
simspec(speca,specd,plot=TRUE)
Run the code above in your browser using DataLab