summaryrefslogtreecommitdiff
path: root/help/en_US/scilab_en_US_help/tfestimate.html
blob: 637bd61a32ec8b2f89d28c2c27fa6f7a71191e29 (plain)
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
88
89
90
91
92
93
94
95
96
97
98
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>tfestimate</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="tfe.html">&lt;&lt; tfe</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="transpose.html">transpose &gt;&gt;</a></span>

      </td>
    </tr></table>
      <hr />
    </div>



    <span class="path"><a href="index.html">FOSSEE Signal Processing Toolbox</a> &gt;&gt; <a href="section_e54aa8aac34aa55341e8b4b782fe1a74.html">FOSSEE Signal Processing Toolbox</a> &gt; tfestimate</span>

    <br /><br />
    <div class="refnamediv"><h1 class="refname">tfestimate</h1>
    <p class="refpurpose"></p></div>


<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
   <div class="synopsis"><pre><span class="functionid">tfestimate</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">window</span><span class="default">, </span><span class="default">overlap</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">range</span><span class="default">)</span>
<span class="default">[</span><span class="default">Pxx</span><span class="default">, </span><span class="default">freq</span><span class="default">] = </span><span class="functionid">tfestimate</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">Input.</p></dd></dt>
   <dt><span class="term">y:</span>
      <dd><p class="para">Output.</p></dd></dt>
   <dt><span class="term">window:</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 &#0039;sloppy&#0039; 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 &lt;= overlap &lt; 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 &#0034;window&#0034; vector or has the same value as the scalar &#0034;window&#0034; argument.  If Nfft is larger than the segment length, &#0034;seg_len&#0034;, the data segment is padded with &#0034;Nfft-seg_len&#0034; 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">&#0039;half&#0039;,  &#0039;onesided&#0039; : 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]. &#0039;whole&#0039;, &#0039;twosided&#0039; : frequency range of the spectrum is  -Fs/2 to Fs/2, with negative frequencies stored in &#0034;wrap around&#0034; order after the positive frequencies; e.g. frequencies for a 10-point &#0039;twosided&#0039; spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 &#0039;shift&#0039;, &#0039;centerdc&#0039; : same as &#0039;whole&#0039; but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See &#0034;help fftshift&#0034;. If data (x and y) are real, the default range is &#0039;half&#0039;, otherwise default range is &#0039;whole&#0039;.</p></dd></dt></dl></div>

<div class="refsection"><h3 class="title">Description</h3>
   <p class="para">This function is being called from Octave.
Estimate transfer function of system with input x and output y. Use the Welch (1967) periodogram/FFT method.</p></div>

<div class="refsection"><h3 class="title">Examples</h3>
   <div class="programlisting"><table border="0" width="100%"><tr><td width="98%"><pre class="scilabcode"><span class="scilabopenclose">[</span><span class="scilabid">Pxx</span><span class="scilabdefault">,</span> <a class="scilabcommand" href="scilab://freq">freq</a><span class="scilabopenclose">]</span><span class="scilaboperator">=</span><span class="scilabid">tfestimate</span> <span class="scilabopenclose">(</span><span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">2</span> <span class="scilabnumber">3</span><span class="scilabopenclose">]</span><span class="scilabdefault">,</span> <span class="scilabopenclose">[</span><span class="scilabnumber">4</span> <span class="scilabnumber">5</span> <span class="scilabnumber">6</span><span class="scilabopenclose">]</span><span class="scilabopenclose">)</span>
<span class="scilabid">Pxx</span> <span class="scilaboperator">=</span>

<span class="scilabnumber">1.7500</span> <span class="scilaboperator">+</span> <span class="scilabnumber">0.0000</span><span class="scilabid">i</span>
<span class="scilabnumber">1.5947</span> <span class="scilaboperator">+</span> <span class="scilabnumber">0.3826</span><span class="scilabid">i</span>
<span class="scilabnumber">1.2824</span> <span class="scilaboperator">+</span> <span class="scilabnumber">0.0000</span><span class="scilabid">i</span>

<a class="scilabcommand" href="scilab://freq">freq</a> <span class="scilabstring">=</span>

<span class="scilabnumber">0.00000</span>
<span class="scilabnumber">0.25000</span>
<span class="scilabnumber">0.50000</span></pre></td><td valign="top"><a href="scilab://scilab.execexample/"><img src="ScilabExecute.png" border="0"/></a></td><td valign="top"><a href="scilab://scilab.editexample/"><img src="ScilabEdit.png" border="0"/></a></td><td></td></tr></table></div></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="tfe.html">&lt;&lt; tfe</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="transpose.html">transpose &gt;&gt;</a></span>

      </td>
    </tr></table>
      <hr />
    </div>
  </body>
</html>