comparison m-toolbox/html_help/help/ug/constructor_examples_specwin.html @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
3
4 <html lang="en">
5 <head>
6 <meta name="generator" content=
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
8 <meta http-equiv="Content-Type" content=
9 "text/html; charset=us-ascii">
10
11 <title>Constructor examples of the SPECWIN class (LTPDA Toolbox)</title>
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
14 <meta name="description" content=
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
16 </head>
17
18 <body>
19 <a name="top_of_page" id="top_of_page"></a>
20
21 <p style="font-size:1px;">&nbsp;</p>
22
23 <table class="nav" summary="Navigation aid" border="0" width=
24 "100%" cellpadding="0" cellspacing="0">
25 <tr>
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
27
28 <td valign="baseline" align="right"><a href=
29 "constructor_examples_plist.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Constructor examples of the PLIST class"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "bycategory.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Functions - By Category"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Constructor examples of the SPECWIN class</h1>
37 <hr>
38
39 <p>
40
41 <!-- -------------------------------------------------- -->
42 <!-- --------------- BEGIN CONTENT FILE --------------- -->
43 <!-- -------------------------------------------------- -->
44
45 <table border="0" summary="Simple list" class="simplelist_nottable_last">
46 <tr>
47 <td>
48 <a href="constructor_examples_specwin.html#empty">Construct empty SPECWIN object</a>
49 </td>
50 </tr>
51 <tr>
52 <td>
53 <a href="constructor_examples_specwin.html#xml_file">Construct a SPECWIN object by loading the object from a file</a>
54 </td>
55 </tr>
56 <tr>
57 <td>
58 <a href="constructor_examples_specwin.html#particular">Construct a SPECWIN of a particular window type an length</a>
59 </td>
60 </tr>
61 <tr>
62 <td>
63 <a href="constructor_examples_specwin.html#kaiser">Construct a SPECWIN Kaiser window with the prescribed psll</a>
64 </td>
65 </tr>
66 <tr>
67 <td>
68 <a href="constructor_examples_specwin.html#plist">Construct a SPECWIN object from a parameter list (PLIST) object</a>
69 </td>
70 </tr>
71 </table>
72
73 <!-- --------------- NEXT EXAMPLE --------------- -->
74
75 <hr>
76 <h2 class="title"><a href="gui_specwin.html">For help in designing a SPECWIN object, see also the Spectral Window GUI documentation</a></h2>
77 <hr />
78 <h2 class="title"></h2>
79 <h2 class="title"><a name="empty"></a>Construct empty SPECWIN object</h2>
80 <p>The following example creates an empty specwin object</p>
81 <div class="fragment"><pre class="programlisting">
82 w = specwin()
83 -------- None ------------
84
85 alpha: -1
86 psll: -1
87 rov: -1
88 nenbw: -1
89 w3db: -1
90 flatness: -1
91 ws: -1
92 ws2: -1
93 win: 1
94
95 --------------------------
96 </pre></div>
97
98 <!-- --------------- NEXT EXAMPLE --------------- -->
99
100 <hr>
101 <h2 class="title"><a name="xml_file"></a>Construct a SPECWIN object by loading the object from a file</h2>
102 <p>The following example creates a new specwin object by loading the specwin object from disk.</p>
103 <div class="fragment"><pre class="programlisting">
104 p = specwin(<span class="string">'specwin.mat'</span>)
105 p = specwin(<span class="string">'specwin.xml'</span>)
106 </pre></div>
107
108 <!-- --------------- NEXT EXAMPLE --------------- -->
109
110 <hr>
111 <h2 class="title"><a name="particular"></a>Construct a SPECWIN of a particular window type an length</h2>
112 <p>To create a spectral window object, you call the <tt>specwin</tt> class constructor. The following
113 code fragment creates a 100-point Hanning window:
114 </p>
115 <div class="fragment"><pre>
116 >> w = specwin(<span class="string">'Hanning'</span>, 100)
117 -------- Hanning ------------
118
119 alpha: 0
120 psll: 31.5
121 rov: 50
122 nenbw: 1.5
123 w3db: 1.4382
124 flatness: -1.4236
125 ws: 50
126 ws2: 37.5
127 win: 100
128
129 -----------------------------
130 </pre></div>
131 <p><a href="specwin_description.html">List of available window functions</a></p>
132
133 <!-- --------------- NEXT EXAMPLE --------------- -->
134
135 <hr>
136 <h2 class="title"><a name="kaiser"></a>Construct a SPECWIN Kaiser window with the prescribed psll</h2>
137 <p>In the special case of creating a Kaiser window, the additional input parameter, PSLL, must be supplied. For example, the following code creates a 100-point Kaiser window with -150dB peak side-lobe level:</p>
138 <div class="fragment"><pre>
139 >> w = specwin(<span class="string">'Kaiser'</span>, 100, 150)
140 -------- Kaiser ------------
141
142 alpha: 6.18029
143 psll: 150
144 rov: 73.3738
145 nenbw: 2.52989
146 w3db: 2.38506
147 flatness: -0.52279
148 ws: 28.2558
149 ws2: 20.1819
150 win: 100
151
152 ----------------------------
153 </pre></div>
154
155 <!-- --------------- NEXT EXAMPLE --------------- -->
156
157 <hr>
158 <h2 class="title"><a name="plist"></a>Construct a SPECWIN object from a parameter list (PLIST) object</h2>
159 <p>Construct a SPECWIN from its definion.
160 <table border="0" summary="Simple list" class="simplelist_nottable_last" width="50%">
161 <tr valign="top">
162 <td width="25%">
163 <p>'Name'</p>
164 </td>
165 <td width="75%">
166 <p>Spectral window name [default: 'Kaiser']</p>
167 </td>
168 </tr>
169 <tr valign="top">
170 <td width="25%">
171 <p>'N'</p>
172 </td>
173 <td width="75%">
174 <p>Spectral window length [default: 10]</p>
175 </td>
176 </tr>
177 <tr valign="top">
178 <td width="25%">
179 <p>'PSLL'</p>
180 </td>
181 <td width="75%">
182 <p>Peak sidelobe length (only for Kaiser type)<br />[default: 150]</p>
183 </td>
184 </tr>
185 </table>
186 </p>
187 <div class="fragment"><pre class="programlisting">
188 pl = plist(<span class="string">'Name'</span>, <span class="string">'Kaiser'</span>, <span class="string">'N'</span>, 1000, <span class="string">'PSLL'</span>, 75);
189
190 w = specwin(pl)
191 -------- Kaiser ------------
192
193 alpha: 3.21394
194 psll: 75
195 rov: 63.4095
196 nenbw: 1.85055
197 w3db: 1.75392
198 flatness: -0.963765
199 ws: 389.305
200 ws2: 280.892
201 win: 1000
202
203 ----------------------------
204 </pre></div>
205 <div class="fragment"><pre class="programlisting">
206 pl = plist(<span class="string">'Name'</span>, <span class="string">'Hanning'</span>, <span class="string">'N'</span>, 1000);
207
208 w =specwin(pl)
209 -------- Hanning ------------
210
211 alpha: 0
212 psll: 31.5
213 rov: 50
214 nenbw: 1.5
215 w3db: 1.4382
216 flatness: -1.4236
217 ws: 500
218 ws2: 375
219 win: 1000
220
221 -----------------------------
222 </pre></div>
223
224
225
226
227
228
229
230
231
232
233
234
235
236 </p>
237
238 <br>
239 <br>
240 <table class="nav" summary="Navigation aid" border="0" width=
241 "100%" cellpadding="0" cellspacing="0">
242 <tr valign="top">
243 <td align="left" width="20"><a href="constructor_examples_plist.html"><img src=
244 "b_prev.gif" border="0" align="bottom" alt=
245 "Constructor examples of the PLIST class"></a>&nbsp;</td>
246
247 <td align="left">Constructor examples of the PLIST class</td>
248
249 <td>&nbsp;</td>
250
251 <td align="right">Functions - By Category</td>
252
253 <td align="right" width="20"><a href=
254 "bycategory.html"><img src="b_next.gif" border="0" align=
255 "bottom" alt="Functions - By Category"></a></td>
256 </tr>
257 </table><br>
258
259 <p class="copy">&copy;LTP Team</p>
260 </body>
261 </html>