Usage
ks.dist(spec1, spec2, f = NULL, plot = FALSE, type = "l",
col = c(2, 4),
lty = c(1, 2), flab = "Frequency (kHz)",
alab = "Cumulated amplitude", flim = c(0, f/2000),
alim = c(0, 1), title = TRUE, legend = TRUE, ...)
Arguments
spec1
any distribution, especially a spectrum obtained with spec
or meanspec
(not in dB). This can be either a two-column matrix (col1 = frequency, col2 = amplitude) spec2
any distribution, especially a spectrum obtained with
spec
or meanspec
(not in dB). This can be
either a two-column matrix (col1 = frequency, col2 = f
sampling frequency of waves used to obtain spec1
and spec2
(in Hz). Not necessary if spec1
and/or spec2
is a two columns matrix obtained with spec
plot
logical, if TRUE
plots both cumulated spectra and
their maximal distance (i.e. the K-S distance.)
type
if plot
is TRUE
, type of plot that should be drawn.
See plot
for details (by default "l" for lines). col
a vector of length 2 for the colour of spec1
and spec2
.
lty
a vector of length 2 for the line type of spec1
and
spec2
if type
="l".
flab
title of the frequency axis.
alab
title of the amplitude axis.
flim
the range of frequency values.
alim
range of amplitude axis.
title
logical, if TRUE
, adds a title with D and F values.
legend
logical, if TRUE
adds a legend to the plot.
...
other plot
graphical parameters.