1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>cohere</title>
<style type="text/css" media="all">
@import url("scilab_code.css");
@import url("xml_code.css");
@import url("c_code.css");
@import url("style.css");
</style>
</head>
<body>
<div class="manualnavbar">
<table width="100%"><tr>
<td width="30%">
<span class="previous"><a href="cmorwavf.html"><< cmorwavf</a></span>
</td>
<td width="40%" class="center">
<span class="top"><a href="section_e54aa8aac34aa55341e8b4b782fe1a74.html">FOSSEE Signal Processing Toolbox</a></span>
</td>
<td width="30%" class="next">
<span class="next"><a href="convmtx.html">convmtx >></a></span>
</td>
</tr></table>
<hr />
</div>
<span class="path"><a href="index.html">FOSSEE Signal Processing Toolbox</a> >> <a href="section_e54aa8aac34aa55341e8b4b782fe1a74.html">FOSSEE Signal Processing Toolbox</a> > cohere</span>
<br /><br />
<div class="refnamediv"><h1 class="refname">cohere</h1>
<p class="refpurpose">Estimate (mean square) coherence of signals "x" and "y"</p></div>
<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
<div class="synopsis"><pre><span class="default">[</span><span class="default">Pxx</span><span class="default">,</span><span class="default">freqs</span><span class="default">] = </span><span class="functionid">cohere</span><span class="default">(</span><span class="default">x</span><span class="default">,</span><span class="default">y</span><span class="default">,</span><span class="default">Nfft</span><span class="default">,</span><span class="default">Fs</span><span class="default">,</span><span class="default">win</span><span class="default">,</span><span class="default">overlap</span><span class="default">,</span><span class="default">ran</span><span class="default">,</span><span class="default">plot_type</span><span class="default">,</span><span class="default">detrends</span><span class="default">)</span></pre></div></div>
<div class="refsection"><h3 class="title">Parameters</h3>
<dl><dt><span class="term">x:</span>
<dd><p class="para">[non-empty vector] system-input time-series data</p></dd></dt>
<dt><span class="term">y:</span>
<dd><p class="para">[non-empty vector] system-output time-series data</p></dd></dt>
<dt><span class="term">win:</span>
<dd><p class="para">[real vector] of window-function values between 0 and 1; the data segment has the same length as the window. Default window shape is Hamming. [integer scalar] length of each data segment. The default value is window=sqrt(length(x)) rounded up to the nearest integer power of 2; see 'sloppy' argument.</p></dd></dt>
<dt><span class="term">overlap:</span>
<dd><p class="para">[real scalar] segment overlap expressed as a multiple of window or segment length. 0 <= overlap < 1, The default is overlap=0.5 .</p></dd></dt>
<dt><span class="term">Nfft:</span>
<dd><p class="para">[integer scalar] Length of FFT. The default is the length of the "window" vector or has the same value as the scalar "window" argument. If Nfft is larger than the segment length, "seg_len", the data segment is padded with "Nfft-seg_len" zeros. The default is no padding. Nfft values smaller than the length of the data segment (or window) are ignored silently.</p></dd></dt>
<dt><span class="term">Fs:</span>
<dd><p class="para">[real scalar] sampling frequency (Hertz); default=1.0</p></dd></dt>
<dt><span class="term">range:</span>
<dd><p class="para">'half', 'onesided' : frequency range of the spectrum is zero up to but not including Fs/2. Power from negative frequencies is added to the positive side of the spectrum, but not at zero or Nyquist (Fs/2) frequencies. This keeps power equal in time and spectral domains. See reference [2]. 'whole', 'twosided' : frequency range of the spectrum is-Fs/2 to Fs/2, with negative frequenciesstored in "wrap around" order after the positivefrequencies; e.g. frequencies for a 10-point 'twosided'spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If data (x and y) are real, the default range is 'half', otherwise default range is 'whole'.</p></dd></dt>
<dt><span class="term">plot_type:</span>
<dd><p class="para">'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db': specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value.</p></dd></dt>
<dt><span class="term">detrends:</span>
<dd><p class="para">'no-strip', 'none' -- do NOT remove mean value from the data'short', 'mean' -- remove the mean value of each segment from each segment of the data. 'linear',-- remove linear trend from each segment of the data.'long-mean'-- remove the mean value from the data before splitting it into segments. This is the default.</p></dd></dt></dl></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Estimate (mean square) coherence of signals "x" and "y".</p>
<p class="para">Use the Welch (1967) periodogram/FFT method.</p></div>
<br />
<div class="manualnavbar">
<table width="100%">
<tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr>
<tr>
<td width="30%">
<span class="previous"><a href="cmorwavf.html"><< cmorwavf</a></span>
</td>
<td width="40%" class="center">
<span class="top"><a href="section_e54aa8aac34aa55341e8b4b782fe1a74.html">FOSSEE Signal Processing Toolbox</a></span>
</td>
<td width="30%" class="next">
<span class="next"><a href="convmtx.html">convmtx >></a></span>
</td>
</tr></table>
<hr />
</div>
</body>
</html>
|