summaryrefslogtreecommitdiff
path: root/help/en_US/scilab_en_US_help/firpmord.html
blob: c9d1213ee5d5fb08c0a0aa344575319eeabebd4d (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>firpmord</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="filtord.html">&lt;&lt; filtord</a></span>

      </td>
      <td width="40%" class="center">
<<<<<<< HEAD
      	<span class="top"><a href="section_5118e822ecc2888aa80042108de4932e.html">FOSSEE Signal Processing Toolbox</a></span>
=======
      	<span class="top"><a href="section_cc2bc01c47967d47fcf3507a91d572ba.html">FOSSEE Signal Processing Toolbox</a></span>
>>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27

      </td>
      <td width="30%" class="next">
      	<span class="next"><a href="firtype.html">firtype &gt;&gt;</a></span>

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



<<<<<<< HEAD
    <span class="path"><a href="index.html">FOSSEE Signal Processing Toolbox</a> &gt;&gt; <a href="section_5118e822ecc2888aa80042108de4932e.html">FOSSEE Signal Processing Toolbox</a> &gt; firpmord</span>
=======
    <span class="path"><a href="index.html">FOSSEE Signal Processing Toolbox</a> &gt;&gt; <a href="section_cc2bc01c47967d47fcf3507a91d572ba.html">FOSSEE Signal Processing Toolbox</a> &gt; firpmord</span>
>>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27

    <br /><br />
    <div class="refnamediv"><h1 class="refname">firpmord</h1>
    <p class="refpurpose">Parks-McClennan optimal FIR filter order estimation</p></div>


<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
   <div class="synopsis"><pre></pre></div></div>

<div class="refsection"><h3 class="title">Parameters</h3>
   <dl><dt><span class="term">f:</span>
      <dd><p class="para">double - positive - vector</p></dd></dt>
   <dt><span class="term">a:</span>
      <dd><p class="para">double - positive - vector</p></dd></dt>
   <dt><span class="term">dev:</span>
      <dd><p class="para">double - positive - vector</p></dd></dt>
   <dt><span class="term">n:</span>
      <dd><p class="para">int - scalar</p></dd></dt>
   <dt><span class="term">fo:</span>
      <dd><p class="para">double - positive - vector</p></dd></dt>
   <dt><span class="term">ao:</span>
      <dd><p class="para">double - positive - vector</p></dd></dt>
   <dt><span class="term">w:</span>
      <dd><p class="para">double - vector</p></dd></dt></dl></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="scilabnumber">1</span><span class="scilabopenclose">]</span> <span class="scilabid">A</span> <span class="scilabid">low</span><span class="scilaboperator">-</span><span class="scilabid">pass</span> <a class="scilabmacro" href="scilab://filter">filter</a>
<span class="scilabid">f</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1500</span> <span class="scilabnumber">2000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>        <span class="scilabcomment">// frequency edges for bands</span>
<span class="scilabid">a</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">0</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>              <span class="scilabcomment">// desired amplitude for each band</span>
<span class="scilabid">dev</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0.01</span> <span class="scilabnumber">0.1</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>       <span class="scilabcomment">// Acceptable deviation for each band</span>
<span class="scilabid">fs</span> <span class="scilaboperator">=</span> <span class="scilabnumber">8000</span><span class="scilabdefault">;</span>              <span class="scilabcomment">// Sampling frequency</span>
<span class="scilabopenclose">[</span><span class="scilabid">n</span><span class="scilabdefault">,</span><span class="scilabid">fo</span><span class="scilabdefault">,</span><span class="scilabid">ao</span><span class="scilabdefault">,</span><span class="scilabid">w</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">firpmord</span><span class="scilabopenclose">(</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">a</span><span class="scilabdefault">,</span><span class="scilabid">dev</span><span class="scilabdefault">,</span><span class="scilabid">fs</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>

<span class="scilabopenclose">[</span><span class="scilabnumber">2</span><span class="scilabopenclose">]</span> <span class="scilabid">A</span> <span class="scilabid">bandstop</span> <a class="scilabmacro" href="scilab://filter">filter</a>
<span class="scilabid">f</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1000</span> <span class="scilabnumber">1800</span> <span class="scilabnumber">2400</span> <span class="scilabnumber">3000</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">a</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">1</span> <span class="scilabnumber">0</span> <span class="scilabnumber">0.5</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">dev</span> <span class="scilaboperator">=</span> <span class="scilabopenclose">[</span><span class="scilabnumber">0.01</span> <span class="scilabnumber">0.1</span> <span class="scilabnumber">0.03</span><span class="scilabopenclose">]</span><span class="scilabdefault">;</span>
<span class="scilabid">fs</span> <span class="scilaboperator">=</span> <span class="scilabnumber">8000</span><span class="scilabdefault">;</span>
<span class="scilabopenclose">[</span><span class="scilabid">n</span><span class="scilabdefault">,</span><span class="scilabid">fo</span><span class="scilabdefault">,</span><span class="scilabid">ao</span><span class="scilabdefault">,</span><span class="scilabid">w</span><span class="scilabopenclose">]</span> <span class="scilaboperator">=</span> <span class="scilabid">firpmord</span><span class="scilabopenclose">(</span><span class="scilabid">f</span><span class="scilabdefault">,</span><span class="scilabid">a</span><span class="scilabdefault">,</span><span class="scilabid">dev</span><span class="scilabdefault">,</span><span class="scilabid">fs</span><span class="scilabopenclose">)</span><span class="scilabdefault">;</span>

<span class="scilabid">References</span>
<span class="scilabopenclose">[</span><span class="scilabnumber">1</span><span class="scilabopenclose">]</span> <span class="scilabid">Rabiner</span><span class="scilabdefault">,</span> <span class="scilabid">Lawrence</span> <span class="scilabid">R</span><span class="scilaboperator">.</span><span class="scilabdefault">,</span> <a class="scilabcommand" href="scilab://and">and</a> <span class="scilabstring">Bernard</span> <span class="scilabstring">Gold.</span> <span class="scilabstring">"Theory</span> <span class="scilabstring">and</span> <span class="scilabstring">application</span> <span class="scilabstring">of</span>
<span class="scilabid">digital</span> <span class="scilabid">signal</span> <span class="scilabid">processing</span><span class="scilaboperator">.</span><span class="scilabstring">&#0034;</span><span class="scilabstring"> Englewood Cliffs, NJ, Prentice-Hall, Inc.,</span>
<span class="scilabnumber">1975.</span> <span class="scilabnumber">777</span> <span class="scilabid">p</span><span class="scilaboperator">.</span> <span class="scilabnumber">156</span><span class="scilaboperator">-</span><span class="scilabnumber">7</span> <span class="scilabopenclose">(</span><span class="scilabnumber">1975</span><span class="scilabopenclose">)</span><span class="scilaboperator">.</span>
<span class="scilabopenclose">[</span><span class="scilabnumber">2</span><span class="scilabopenclose">]</span> <span class="scilabid">Rabiner</span><span class="scilabdefault">,</span> <span class="scilabid">Lawrence</span> <span class="scilabid">R</span><span class="scilaboperator">.</span><span class="scilabdefault">,</span> <a class="scilabcommand" href="scilab://and">and</a> <span class="scilabstring">Otto</span> <span class="scilabstring">Herrmann.</span> <span class="scilabstring">"The</span> <span class="scilabstring">predictability</span> <span class="scilabstring">of</span> <span class="scilabstring">certain</span>
<span class="scilabid">optimum</span> <span class="scilabid">finite</span><span class="scilaboperator">-</span><span class="scilabid">impulse</span><span class="scilaboperator">-</span><span class="scilabid">response</span> <span class="scilabid">digital</span> <span class="scilabid">filters</span><span class="scilaboperator">.</span><span class="scilabstring">&#0034;</span><span class="scilabstring"> Circuit Theory,</span>
<span class="scilabid">IEEE</span> <span class="scilabid">Transactions</span> <span class="scilabid">on</span> <span class="scilabnumber">20.4</span> <span class="scilabopenclose">(</span><span class="scilabnumber">1973</span><span class="scilabopenclose">)</span><span class="scilabspecial">:</span> <span class="scilabnumber">401</span><span class="scilaboperator">-</span><span class="scilabnumber">408.</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>

<div class="refsection"><h3 class="title">Authors</h3>
   <ul class="itemizedlist"><li class="member">Ayush Baid</li></ul></div>

<div class="refsection"><h3 class="title">See also</h3>
   <ul class="itemizedlist"></ul></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="filtord.html">&lt;&lt; filtord</a></span>

      </td>
      <td width="40%" class="center">
<<<<<<< HEAD
      	<span class="top"><a href="section_5118e822ecc2888aa80042108de4932e.html">FOSSEE Signal Processing Toolbox</a></span>
=======
      	<span class="top"><a href="section_cc2bc01c47967d47fcf3507a91d572ba.html">FOSSEE Signal Processing Toolbox</a></span>
>>>>>>> 3f916032cc0b2efdeafb838dd10e1141ead2cb27

      </td>
      <td width="30%" class="next">
      	<span class="next"><a href="firtype.html">firtype &gt;&gt;</a></span>

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