coh {seewave}R Documentation

Coherence between two time waves

Description

This function returns the frequency coherence between two time waves.

Usage

coh(wave1, wave2, f, plot =TRUE, xlab = "Frequency (kHz)",
ylab = "Coherence", xlim = c(0,f/2000), ...)

Arguments

wave1 data or a Sample object created loading a wav file with loadSample (package Sound) describing a first time wave.
wave2 data or a Sample object created loading a wav file with loadSample (package Sound) describing a second time wave.
f sampling frequency of wave1 and wave1 (in Hz).
plot logical, if TRUE plots the continuous coherence function (by default TRUE).
xlab title of the frequency X-axis.
ylab title of the coherence Y-axis.
xlim range of frequency X-axis
... other plot graphical parameters.

Details

Coherence is a frequency domain function computed to show the degree of a relationship between two signals. The value of the coherence function ranges between zero and one, where a value of zero indicates there is no causal relationship between the signals. A value of one indicates the existence of linear frequency response between the two signals. This can be used, for instance, to compare the input and output signals of a system.

Value

If plot is FALSE, this function returns a one-column matrix corresponding to the coherence.

Note

This function is based on spec.pgram.

Author(s)

Jérôme Sueur jerome.sueur@univ-tours.fr but this function is based on spec.pgram by Martyn Plummer, Adrian Trapletti and B.D. Ripley.

See Also

ccoh, spectro, spec.pgram.

Examples

wave1<-synth(d=1,f=4000,cf=500)
wave2<-synth(d=1,f=4000,cf=800)
ccoh(wave1,wave2,f=4000)

[Package seewave version 1.4.2 Index]