summaryrefslogtreecommitdiff
path: root/help/en_US/scilab_en_US_help/pburg.html
blob: af69b9dde72872ee0cf12c594606898f2a952a2e (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
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>pburg</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="parzenwin.html">&lt;&lt; parzenwin</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="pchip.html">pchip &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; pburg</span>

    <br /><br />
    <div class="refnamediv"><h1 class="refname">pburg</h1>
    <p class="refpurpose">Calculate Burg maximum-entropy power spectral density.</p></div>


<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
   <div class="synopsis"><pre><span class="default">[</span><span class="default">psd</span><span class="default">,</span><span class="default">f_out</span><span class="default">] = </span><span class="functionid">pburg</span><span class="default">(</span><span class="default">x</span><span class="default">,</span><span class="default">poles</span><span class="default">,</span><span class="default">freq</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">method</span><span class="default">,</span><span class="default">plot_type</span><span class="default">,</span><span class="default">criterion</span><span class="default">)</span>
<span class="default">All</span> <span class="default">but</span> <span class="default">the</span> <span class="default">first</span> <span class="default">two</span> <span class="default">arguments</span> <span class="default">are</span> <span class="default">optional</span> <span class="default">and</span> <span class="default">may</span> <span class="default">be</span> <span class="default">empty</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">[vector] sampled data</p></dd></dt>
   <dt><span class="term">poles:</span>
      <dd><p class="para">[integer scalar] required number of poles of the AR model</p></dd></dt>
   <dt><span class="term">freq:</span>
      <dd><p class="para">[real vector] frequencies at which power spectral density is calculated [integer scalar] number of uniformly distributed frequency values at which spectral density is calculated.    [default=256]</p></dd></dt>
   <dt><span class="term">Fs:</span>
      <dd><p class="para">[real scalar] sampling frequency (Hertz) [default=1]</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 from zero up to but not including sample_f/2.  Power from negative frequencies is added to the positive side of the spectrum.   &#0039;whole&#0039;, &#0039;twosided&#0039; : frequency range of the spectrum is -sample_f/2 to sample_f/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 &#0034;freq&#0034; is vector, &#0039;shift&#0039; is ignored. If model coefficients &#0034;ar_coeffs&#0034; are real, the default range is &#0039;half&#0039;, otherwise default range is &#0039;whole&#0039;.</p></dd></dt>
   <dt><span class="term">method:</span>
      <dd><p class="para">&#0039;fft&#0039;:  use FFT to calculate power spectral density. &#0039;poly&#0039;: calculate spectral density as a polynomial of 1/z N.B. this argument is ignored if the &#0034;freq&#0034; argument is a vector.  The default is &#0039;poly&#0039; unless the &#0034;freq&#0034; argument is an integer power of 2.</p></dd></dt>
   <dt><span class="term">plot_type:</span>
      <dd><p class="para">&#0039;plot&#0039;, &#0039;semilogx&#0039;, &#0039;semilogy&#0039;, &#0039;loglog&#0039;, &#0039;squared&#0039; or &#0039;db&#0039; specifies the type of plot.  The default is &#0039;plot&#0039;, which means linear-linear axes. &#0039;squared&#0039; is the same as &#0039;plot&#0039;. &#0039;dB&#0039; plots &#0034;10*log10(psd)&#0034;.  This argument is ignored and a spectrum is not plotted if the caller requires a returned value.</p></dd></dt>
   <dt><span class="term">criterion:</span>
      <dd><p class="para">[optional string arg]  model-selection criterion.  Limits the number of poles so that spurious poles are not added when the whitened data has no more information in it (see Kay &amp; Marple, 1981). Recognized values are &#0039;AKICc&#0039; -- approximate corrected Kullback information  criterion (recommended), &#0039;KIC&#0039;  -- Kullback information criterion  &#0039;AICc&#0039; -- corrected Akaike information criterion &#0039;AIC&#0039;  -- Akaike information criterion &#0039;FPE&#0039;  -- final prediction error&#0034; criterion The default is to NOT use a model-selection criterion.</p></dd></dt></dl></div>

<div class="refsection"><h3 class="title">Description</h3>
   <p class="para">This function is being called from Octave
This function is a wrapper for arburg and ar_psd.
The functions &#0034;arburg&#0034; and &#0034;ar_psd&#0034; do all the work.
See &#0034;help arburg&#0034; and &#0034;help ar_psd&#0034; for further details.</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="scilabid">a</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1.0</span> <span class="scilaboperator">-</span><span class="scilabnumber">1.6216505</span> <span class="scilabnumber">1.1102795</span> <span class="scilaboperator">-</span><span class="scilabnumber">0.4621741</span> <span class="scilabnumber">0.2075552</span> <span class="scilaboperator">-</span><span class="scilabnumber">0.018756746</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabopenclose">[</span><span class="scilabid">psd</span><span class="scilabdefault">,</span><span class="scilabid">f_out</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">pburg</span><span class="scilabopenclose">(</span><span class="scilabid">a</span><span class="scilabdefault">,</span><span class="scilabnumber">2</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</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="parzenwin.html">&lt;&lt; parzenwin</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="pchip.html">pchip &gt;&gt;</a></span>

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