2.11.3 cohere(Pro)

Menu Information

Analysis: Signal Processing: Coherence

Brief Information

Calculate coherence between two signals

Additional Information

This feature is for OriginPro only.

Command Line Usage

1. cohere ix1:=Col(1) ix2:=Col(2);

2. cohere ix1:=Col(1) ix2:=Col(2) win:=bartlett winlen:=32 fftlen:=64 overlap:=0;

3. cohere ix1:=Col(1) ix2:=Col(2) oy:=(Col(3), Col(4));

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input ix1

Input

vector

<active>

Specifies the first input signal

Input ix2

Input

vector

<active>

Specifies the second input signal

Sampling Interval interval

Input

double

1.0

Specifies the sampling interval. The default is <auto>, which corresponds to an automatically computed interval.

FFT Length fftlen

Input

int

256

Specifies the FFT length

Window Type win

Input

int

rect

Specifies the window function used in FFT.

Option list

  • rect:Rectangle
    Rectangular window
  • welch:Welch
    Welch window
  • tri:Triangular
    Triangular window
  • bartlett:Bartlett
    Bartlett window
  • hanning:Hanning
    Hann window
  • hamming:Hamming
    Hamming window
  • blackman:Blackman
    Blackman window
  • gauss:Gaussian
    Gaussian window
  • kaise:Kaiser
    Kaiser window
Window Length winlen

Input

int

256

Specifies the windows size for FFT. It cannot be larger than the fftlen.

Overlap overlap

Input

int

128

Specifies the number of data points by which the window sections overlap. It must be a positive value which is less than winlen.

Alpha alpha

Input

double

0

This variable is only available when window type is Gaussian. It specifies the Alpha parameter (the reciprocal of the standard deviation) for Gaussian window.

Beta beta

Input

double

0

This variable is only available when window type is Kaiser. It specifies the Beta parameter for Kaiser window.

Output oy

Output

XYRange

<new>

Specifies the output.

See the syntax here.


Examples

1. To compute the coherence using default settings, to data in columns 1 and 2 of the active worksheet, use the script command:

cohere ix1:=Col(1) ix2:=Col(2);

2. To compute coherence using a pre-saved theme file, save your preferences in the cohere dialog, and then execute it by typing the following script command, using your own saved-theme title:

cohere -t "my coherence theme.oth"

More Information

For more information, please refer to our User Guide.


Related X-Functions

fft1, corr1


Keywords:fourier, fft, window, overlap