0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 <html lang="en">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 <head>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 <meta name="generator" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 <meta http-equiv="Content-Type" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 "text/html; charset=us-ascii">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 <title>Constructor examples of the MFIR class (LTPDA Toolbox)</title>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 <meta name="description" content=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 </head>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 <body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 <a name="top_of_page" id="top_of_page"></a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 <p style="font-size:1px;"> </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 <td valign="baseline" align="right"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 "constructor_examples_smodel.html"><img src="b_prev.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 "bottom" alt="Constructor examples of the SMODEL class"></a> <a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 "constructor_examples_miir.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 "bottom" alt="Constructor examples of the MIIR class"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Constructor examples of the MFIR class</h1>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 <!-- -------------------------------------------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 <!-- --------------- BEGIN CONTENT FILE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 <!-- -------------------------------------------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 <!-- --------------- Link box: begin --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 <table border="0" summary="Simple list" class="simplelist_nottable_last">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 <a href="constructor_examples_mfir.html#copy">Copy an MFIR object</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 <a href="constructor_examples_mfir.html#xml_file">Construct a MFIR object by loading the object from a file</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 <a href="constructor_examples_mfir.html#ao">Construct a MFIR object from an Analysis Object <tt>(AO)</tt></a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 <a href="constructor_examples_rational.html#pzmodel">Construct a MFIR object from a pole/zero model <tt>(PZMODEL)</tt></a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 <a href="constructor_examples_mfir.html#std_type">Construct a MFIR object from a standard type</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 <a href="constructor_examples_mfir.html#exist_model">Construct a MFIR object from an existing filter model</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 <tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 <a href="constructor_examples_mfir.html#equation">Construct a MFIR object from a difference equation</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 <!-- --------------- Link box: end --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 <h2 class="title"><a name="copy"></a>Copy an FIR filter object</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 <p>The following example creates a copy of an FIR filter object (blue command).</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 >> fir1 = mfir(plist(<span class="string">'type'</span>, <span class="string">'lowpass'</span>));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 <span class="blue">>> fir2 = mfir(fir2)</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 ------ mfir/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 gd: 32.5
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 version: $Id: mfir.m,v 1.84 2009/02/24 17:02:44 ingo Exp
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 ntaps: 65
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 fs: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 infile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 a: [0.0007 0.0004 -6.9093e-19 -0.0006 -0.0012 -0.0014 -0.0011 1.4147e-18 ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 histout: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 iunits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 ounits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 hist: mfir.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 name: lowpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 ---------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 <br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 <p>REMARK: The following command copies only the handle of an object and doesn't create a copy of the object (as above). This means that everything that happens to the copy or original happens to the other object.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 >> fir1 = mfir()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 ------ mfir/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 gd: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 version: $Id: mfir.m,v 1.84 2009/02/24 17:02:44 ingo Exp
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 ntaps: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 fs: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 infile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 a: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 histout: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 iunits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 ounits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 hist: mfir.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 name: none
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 ---------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 >> fir2 = fir1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 >> fir2.setName(<span class="string">'my new name'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 ------ mfir/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 gd: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 version: $Id: mfir.m,v 1.84 2009/02/24 17:02:44 ingo Exp
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 ntaps: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 fs: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 infile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 a: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 histout: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 iunits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 ounits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 hist: mfir.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 name: <span class="string">my new name</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 ---------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 <br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 <p>If we display fir1 again then we see that the property 'name' was changed although we only have changed fir2.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 >> fir1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 ------ mfir/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 gd: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 version: $Id: mfir.m,v 1.84 2009/02/24 17:02:44 ingo Exp
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 ntaps: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 fs: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 infile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 a: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 histout: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 iunits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 ounits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 hist: mfir.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 name: <span class="string">my new name</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 ---------------------</pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 <h2 class="title"><a name="xml_file"></a>Construct a MFIR object by loading the object from a file</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 <p>The following example creates a new mfir object by loading the mfir object from disk.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 fir = mfir(<span class="string">'fir.mat'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 fir = mfir(<span class="string">'fir.xml'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 <p>or in a <tt>PLIST</tt></p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 pl = plist(<span class="string">'filename'</span>, <span class="string">'fir.xml'</span>);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 fir = mfir(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 <h2 class="title"><a name="ao"></a>Construct a MFIR object from an Analysis Object</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 <p> An FIR filter object can be generated based on the magnitude of the input AO/fsdata object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 In the following example an AO/fsdata object is first generated and then passed to the mfir constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 to obtain the equivalent FIR filter.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 a1 = ao(plist(<span class="string">'fsfcn'</span>, <span class="string">'1./(50+f)'</span>, <span class="string">'fs'</span>, 1000, <span class="string">'f'</span>, linspace(0, 500, 1000)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 fir = mfir(a1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 iplot(a1, resp(fir));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 <p>or in a PLIST with the relevant parameters:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 <th class="subcategorylist">Key</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 <th class="subcategorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 <p>'method'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 <p>the design method:<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 'frequency-sampling' - uses fir2()<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 'least-squares' - uses firls()<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 'Parks-McClellan' - uses firpm()<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 [default: 'frequency-sampling']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 <p>'win'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 <p>Window function for frequency-sampling method [default: 'Hanning']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 <p>'N'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 <p>Filter order [default: 512]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 <p>The following example creates a mfir object from an analysis object.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 a1 = ao(plist(<span class="string">'fsfcn'</span>, <span class="string">'1./(50+f)'</span>, <span class="string">'fs'</span>, 1000, <span class="string">'f'</span>, linspace(0, 500, 1000)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 pl = plist(<span class="string">'ao'</span>, a1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 fir = mfir(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 <h2 class="title"><a name="pzmodel"></a>Construct an FIR filter object from a pole/zero model</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 <p>The following example creates a new FIR filter object from a pole/zero model.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 >> pzm = pzmodel(1, {1 2 3}, {4 5}, <span class="string">'my pzmodel'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 ---- pzmodel 1 ----
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 name: my pzmodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 gain: 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 delay: 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 iunits: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 ounits: []
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 pole 001: (f=1 Hz,Q=NaN)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 pole 002: (f=2 Hz,Q=NaN)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 pole 003: (f=3 Hz,Q=NaN)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 zero 001: (f=4 Hz,Q=NaN)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 zero 002: (f=5 Hz,Q=NaN)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 -------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 >> fir = mfir(pzm) <span class="comment">% Use the default sample rate fs=8 * frequency of the highest pole or zero in the model</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 >> fir = mfir(pzm, plist(<span class="string">'fs'</span>, 100))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 ------ mfir/1 -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 gd: 257
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 version: $Id: mfir.m,v 1.84 2009/02/24 17:02:44 ingo Exp
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 ntaps: 513
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 fs: 100
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 infile:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 a: [-0 -3.013e-10 -1.2486e-09 -2.8506e-09 -5.1166e-09 -7.8604e-09 -1.1133e-08 ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 histout: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 iunits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 ounits: [] [1x1 unit]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 hist: mfir.hist [1x1 history]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 name: my pzmodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 ---------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 <p>or in a PLIST with the relevant parameters:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 <th class="subcategorylist">Key</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 <th class="subcategorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 <p>'pzmodel'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 <p>A pzmodel object to construct the filter from [default: empty pzmodel]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 <p>'fs'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 <p>Sample rate [default: 8 * frequency of the highest pole or zero in the model]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 >> pzm = pzmodel(1, {1 2 3}, {4 5}, <span class="string">'my pzmodel'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 >> pl = plist(<span class="string">'pzmodel'</span>, pzm, <span class="string">'fs'</span>, 100)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 >> fir = mfir(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 <hr></hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 <h2 class="title"><a name="std_type"></a>Construct a MFIR object from a standard type</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 <p>Construct an FIR filter object from a standard type: 'lowpass', 'highpass', 'bandpass' or 'bandreject'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 <p>The relevant parameters are:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 <th class="subcategorylist">Key</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 <th class="subcategorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 <p>'type'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 <p>one of the types: 'highpass', 'lowpass', 'bandpass', 'bandreject'<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 [default 'lowpass']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 <p>You can also specify optional parameters:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 <th class="subcategorylist">Key</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 <th class="subcategorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 <p>'gain'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 <p>The gain of the filter [default: 1]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 <p>'fc'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 <p>The roll-off frequency [default: 0.1 Hz]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 <p>'fs'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 <p>The sampling frequency to design for [default: 1 Hz]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 <p>'order'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 <p>The filter order [default: 64]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 <p>'win'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 <p>Specify window function used in filter design [default: 'Hamming']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 <p>'iunits'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 <p>the input unit of the filter</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 <p>'ounits'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 <p>the output unit of the filter</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 <p>The following example creates an order 64 highpass filter with high frequency gain 2. Filter is designed for 1 Hz sampled data and has a cut-off frequency of 0.2 Hz.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 pl = plist(<span class="string">'type'</span>, <span class="string">'highpass'</span>, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 <span class="string">'order'</span>, 64, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 <span class="string">'gain'</span>, 2.0, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 <span class="string">'fs'</span>, 1, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 <span class="string">'fc'</span>, 0.2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 f = mfir(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 <p>Furthermore it is possible to specify a spectral window.</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 win = specwin(<span class="string">'Kaiser'</span>, 11, 150);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 pl = plist(<span class="string">'type'</span>, <span class="string">'lowpass'</span>, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 <span class="string">'Win'</span>, win, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432 <span class="string">'fs'</span>, 100, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 <span class="string">'fc'</span>, 20, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434 <span class="string">'order'</span>, 10);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 f = mfir(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 <h2 class="title"><a name="exist_model"></a>Construct a MFIR object from an existing filter</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442 <p>The mfir constructor also accepts as an input existing filters stored in different formats:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 <p>LISO files</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 f = mfir(<span class="string">'foo_fir.fil'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447 <p>XML files</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 f = mfir(<span class="string">'foo_fir.xml'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451 <p>MAT files</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 f = mfir(<span class="string">'foo_fir.mat'</span>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455 <p>From an LTPDA repository</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456 <p>The relevant parameters for retrieving a FIR filter from a LTPDA repository are:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465 <th class="subcategorylist">Key</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466 <th class="subcategorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
467 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
468 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
469 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
470 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
471 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
472 <p>'hostname'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
473 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
474 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
475 <p>the repository hostname. [default: 'localhost']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
476 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
477 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
478 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
479 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
480 <p>'database'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
481 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
482 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
483 <p>The database name [default: 'ltpda']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
484 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
485 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
486 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
487 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
488 <p>'id'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
489 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
490 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
491 <p>A vector of object IDs. [default: []]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
492 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
493 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
494 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
495 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
496 <p>'cid'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
497 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
498 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
499 <p>Retrieve all rational objects from a particular collection</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
500 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
501 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
502 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
503 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
504 <p>'binary'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
505 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
506 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
507 <p>Set to 'yes' to retrieve from stored binary representation (not always available). [default: yes]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
508 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
509 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
510 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
511 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
512 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
513 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
514 f = mfir(plist(<span class="string">'hostname'</span>, <span class="string">'localhost'</span>, <span class="string">'database'</span>, <span class="string">'ltpda'</span>, <span class="string">'ID'</span>, []))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
515 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
516
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
517
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
518 <!-- --------------- NEXT EXAMPLE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
519
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
520 <hr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
521 <h2 class="title"><a name="equation"></a>Construct a MFIR object from a difference equation</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
522 <p>The filter can be defined in terms of two vectors specifying the coefficients of the filter and the sampling frequency. The following example creates a FIR filter with sampling frequency 1 Hz and the following recursive equation:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
523 <div align="center">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
524 <IMG src="images/sigproc_10.png" width="202" height="28" align="middle" border="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
525 </div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
526 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
527 a = [-0.8 10];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
528 fs = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
529
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
530 f = mfir(a,fs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
531 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
532 <p>or in a <tt>PLIST</tt></p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
533 <p>The relevant parameters are:</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
534 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
535 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
536 <colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
537 <col width="25%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
538 <col width="75%"/>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
539 </colgroup>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
540 <thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
541 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
542 <th class="subcategorylist">Key</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
543 <th class="subcategorylist">Description</th>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
544 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
545 </thead>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
546 <tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
547 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
548 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
549 <p>'a'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
550 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
551 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
552 <p>vector of A coefficients. (see note ** below) [default: empty]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
553 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
554 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
555 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
556 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
557 <p>'fs'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
558 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
559 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
560 <p>sampling frequency of the filter [default: empty]</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
561 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
562 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
563 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
564 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
565 <p>'name'</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
566 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
567 <td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
568 <p>name of filter [default: 'None']</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
569 </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
570 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
571 </tbody>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
572 </table>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
573 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
574 <div class="fragment"><pre class="programlisting">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
575 a = [-0.8 10];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
576 fs = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
577 pl = plist(<span class="string">'a'</span>, a, <span class="string">'fs'</span>, fs);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
578
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
579 fir = mfir(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
580 </pre></div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
581 <br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
582 <div class="fragment">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
583 NOTES:<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
584 ** The convention used here for naming the filter coefficients is the opposite to MATLAB's convention. The recursion formula for this convention is<br></br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
585 y(n) = a(1)*x(n) + a(2)*x(n-1) + ... + a(na+1)*x(n-na).
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
586 </div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
587
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
588
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
589 <!-- ------------------------------------------------ -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
590 <!-- --------------- END CONTENT FILE --------------- -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
591 <!-- ------------------------------------------------ -->
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
592
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
593 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
594
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
595 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
596 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
597 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
598 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
599 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
600 <td align="left" width="20"><a href="constructor_examples_smodel.html"><img src=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
601 "b_prev.gif" border="0" align="bottom" alt=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
602 "Constructor examples of the SMODEL class"></a> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
603
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
604 <td align="left">Constructor examples of the SMODEL class</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
605
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
606 <td> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
607
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
608 <td align="right">Constructor examples of the MIIR class</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
609
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
610 <td align="right" width="20"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
611 "constructor_examples_miir.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
612 "bottom" alt="Constructor examples of the MIIR class"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
613 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
614 </table><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
615
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
616 <p class="copy">©LTP Team</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
617 </body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
618 </html>
|