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>Downsampling data (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 "preproc.html"><img src="b_prev.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 "bottom" alt="Signal Pre-processing in LTPDA"></a> <a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 "upsample.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 "bottom" alt="Upsampling data"></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>Downsampling data</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 <h2>Description</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 Downsampling is the process of reducing the sampling rate of a signal. <a href="matlab:doc('ao/downsample')"><tt>Downsample</tt></a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 reduces the sampling rate of the input AOs by an integer factor by picking up one out of N samples.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 Note that no anti-aliasing filter is applied to the original data. Moreover, a <tt>offset</tt> can be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 specified, i.e., the sample at which the output data starts ---see examples below.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 <h2>Syntax</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 b = downsample(a, pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 </pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 </div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 <h2>Parameters</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 <p> The following parameters can be set in this method:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 <ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 <li> <tt>factor</tt> - decimation factor [by default is 1: no downsampling] (must be an integer) </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 <li> <tt>offset</tt> - sample offset for decimation </li>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 </ul>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 <h2>Examples</h2>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 1. Downsampling a sequence of random data at original sampling rate of 10 Hz by a factor of 4 (<tt>fsout</tt> = 2.5 Hz) and no <tt>offset</tt>.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 <span class="comment">% create an AO of random data with fs = 10 Hz</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 pl = plist(<span class="string">'tsfcn'</span>, <span class="string">'randn(size(t))'</span>,<span class="string">'fs'</span>,10,<span class="string">'nsecs'</span>,10,<span class="string">'yunits'</span>,<span class="string">'m'</span>);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 x = ao(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 pl_down = plist(<span class="string">'factor'</span>, 4); <span class="comment">% add the decimation factor</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 y = downsample(x, pl_down); <span class="comment">% downsample the input AO, x</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 iplot(x, y)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 </pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 </div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 <img src="images/downsample1.png" alt="Downsample" border="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 <p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 2. Downsampling a sequence of random data at original sampling rate of 10 Hz by a factor of 4 (<tt>fsout</tt> = 2.5 Hz) and <tt>offset</tt> = 10.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 <div class="fragment"><pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 <span class="comment">% create an AO of random data with fs = 10 Hz</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 pl = plist(<span class="string">'tsfcn'</span>, <span class="string">'randn(size(t))'</span>,<span class="string">'fs'</span>,10,<span class="string">'nsecs'</span>,10,<span class="string">'yunits'</span>,<span class="string">'m'</span>);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 x = ao(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 pl_downoff = plist(<span class="string">'factor'</span>, 4,<span class="string">'offset'</span>,10); <span class="comment">% add the decimation factor and the offset parameter</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 y = downsample(x, pl_downoff); <span class="comment">% downsample the input AO, x</span>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 iplot(x, y)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 </pre>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 </div>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 <img src="images/downsample2.png" alt="Downsample" border="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 </p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 <br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 <table class="nav" summary="Navigation aid" border="0" width=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 "100%" cellpadding="0" cellspacing="0">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 <tr valign="top">
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 <td align="left" width="20"><a href="preproc.html"><img src=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 "b_prev.gif" border="0" align="bottom" alt=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 "Signal Pre-processing in LTPDA"></a> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 <td align="left">Signal Pre-processing in LTPDA</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 <td> </td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 <td align="right">Upsampling data</td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 <td align="right" width="20"><a href=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 "upsample.html"><img src="b_next.gif" border="0" align=
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 "bottom" alt="Upsampling data"></a></td>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 </tr>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 </table><br>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 <p class="copy">©LTP Team</p>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 </body>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 </html>
|