comparison m-toolbox/html_help/help/ug/constructor_examples_specwin_content.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 <!-- $Id: constructor_examples_specwin_content.html,v 1.3 2009/09/08 14:51:06 nicola Exp $ -->
2
3 <!-- -------------------------------------------------- -->
4 <!-- --------------- BEGIN CONTENT FILE --------------- -->
5 <!-- -------------------------------------------------- -->
6
7 <table border="0" summary="Simple list" class="simplelist_nottable_last">
8 <tr>
9 <td>
10 <a href="constructor_examples_specwin.html#empty">Construct empty SPECWIN object</a>
11 </td>
12 </tr>
13 <tr>
14 <td>
15 <a href="constructor_examples_specwin.html#xml_file">Construct a SPECWIN object by loading the object from a file</a>
16 </td>
17 </tr>
18 <tr>
19 <td>
20 <a href="constructor_examples_specwin.html#particular">Construct a SPECWIN of a particular window type an length</a>
21 </td>
22 </tr>
23 <tr>
24 <td>
25 <a href="constructor_examples_specwin.html#kaiser">Construct a SPECWIN Kaiser window with the prescribed psll</a>
26 </td>
27 </tr>
28 <tr>
29 <td>
30 <a href="constructor_examples_specwin.html#plist">Construct a SPECWIN object from a parameter list (PLIST) object</a>
31 </td>
32 </tr>
33 </table>
34
35 <!-- --------------- NEXT EXAMPLE --------------- -->
36
37 <hr>
38 <h2 class="title"><a href="gui_specwin.html">For help in designing a SPECWIN object, see also the Spectral Window GUI documentation</a></h2>
39 <hr />
40 <h2 class="title"></h2>
41 <h2 class="title"><a name="empty"></a>Construct empty SPECWIN object</h2>
42 <p>The following example creates an empty specwin object</p>
43 <div class="fragment"><pre class="programlisting">
44 w = specwin()
45 -------- None ------------
46
47 alpha: -1
48 psll: -1
49 rov: -1
50 nenbw: -1
51 w3db: -1
52 flatness: -1
53 ws: -1
54 ws2: -1
55 win: 1
56
57 --------------------------
58 </pre></div>
59
60 <!-- --------------- NEXT EXAMPLE --------------- -->
61
62 <hr>
63 <h2 class="title"><a name="xml_file"></a>Construct a SPECWIN object by loading the object from a file</h2>
64 <p>The following example creates a new specwin object by loading the specwin object from disk.</p>
65 <div class="fragment"><pre class="programlisting">
66 p = specwin(<span class="string">'specwin.mat'</span>)
67 p = specwin(<span class="string">'specwin.xml'</span>)
68 </pre></div>
69
70 <!-- --------------- NEXT EXAMPLE --------------- -->
71
72 <hr>
73 <h2 class="title"><a name="particular"></a>Construct a SPECWIN of a particular window type an length</h2>
74 <p>To create a spectral window object, you call the <tt>specwin</tt> class constructor. The following
75 code fragment creates a 100-point Hanning window:
76 </p>
77 <div class="fragment"><pre>
78 >> w = specwin(<span class="string">'Hanning'</span>, 100)
79 -------- Hanning ------------
80
81 alpha: 0
82 psll: 31.5
83 rov: 50
84 nenbw: 1.5
85 w3db: 1.4382
86 flatness: -1.4236
87 ws: 50
88 ws2: 37.5
89 win: 100
90
91 -----------------------------
92 </pre></div>
93 <p><a href="specwin_description.html">List of available window functions</a></p>
94
95 <!-- --------------- NEXT EXAMPLE --------------- -->
96
97 <hr>
98 <h2 class="title"><a name="kaiser"></a>Construct a SPECWIN Kaiser window with the prescribed psll</h2>
99 <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>
100 <div class="fragment"><pre>
101 >> w = specwin(<span class="string">'Kaiser'</span>, 100, 150)
102 -------- Kaiser ------------
103
104 alpha: 6.18029
105 psll: 150
106 rov: 73.3738
107 nenbw: 2.52989
108 w3db: 2.38506
109 flatness: -0.52279
110 ws: 28.2558
111 ws2: 20.1819
112 win: 100
113
114 ----------------------------
115 </pre></div>
116
117 <!-- --------------- NEXT EXAMPLE --------------- -->
118
119 <hr>
120 <h2 class="title"><a name="plist"></a>Construct a SPECWIN object from a parameter list (PLIST) object</h2>
121 <p>Construct a SPECWIN from its definion.
122 <table border="0" summary="Simple list" class="simplelist_nottable_last" width="50%">
123 <tr valign="top">
124 <td width="25%">
125 <p>'Name'</p>
126 </td>
127 <td width="75%">
128 <p>Spectral window name [default: 'Kaiser']</p>
129 </td>
130 </tr>
131 <tr valign="top">
132 <td width="25%">
133 <p>'N'</p>
134 </td>
135 <td width="75%">
136 <p>Spectral window length [default: 10]</p>
137 </td>
138 </tr>
139 <tr valign="top">
140 <td width="25%">
141 <p>'PSLL'</p>
142 </td>
143 <td width="75%">
144 <p>Peak sidelobe length (only for Kaiser type)<br />[default: 150]</p>
145 </td>
146 </tr>
147 </table>
148 </p>
149 <div class="fragment"><pre class="programlisting">
150 pl = plist(<span class="string">'Name'</span>, <span class="string">'Kaiser'</span>, <span class="string">'N'</span>, 1000, <span class="string">'PSLL'</span>, 75);
151
152 w = specwin(pl)
153 -------- Kaiser ------------
154
155 alpha: 3.21394
156 psll: 75
157 rov: 63.4095
158 nenbw: 1.85055
159 w3db: 1.75392
160 flatness: -0.963765
161 ws: 389.305
162 ws2: 280.892
163 win: 1000
164
165 ----------------------------
166 </pre></div>
167 <div class="fragment"><pre class="programlisting">
168 pl = plist(<span class="string">'Name'</span>, <span class="string">'Hanning'</span>, <span class="string">'N'</span>, 1000);
169
170 w =specwin(pl)
171 -------- Hanning ------------
172
173 alpha: 0
174 psll: 31.5
175 rov: 50
176 nenbw: 1.5
177 w3db: 1.4382
178 flatness: -1.4236
179 ws: 500
180 ws2: 375
181 win: 1000
182
183 -----------------------------
184 </pre></div>
185
186
187
188
189
190
191
192
193
194
195
196