comparison m-toolbox/html_help/help/ug/upsample.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>Upsampling data (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 "downsample.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Downsampling data"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "resample.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Resampling data"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Upsampling data</h1>
37 <hr>
38
39 <p>
40 <h2>Description</h2>
41 <p>
42 Upsampling is the process of increasing the sampling rate of a signal. <a href="matlab:doc('ao/upsample')"><tt>Upsample</tt></a> increases the sampling rate of the input AOs by an integer factor. LTPDA <a href="matlab:doc('ao/upsample')"><tt>upsample</tt></a> overloads <tt>upsample</tt> function from Matlab Signal Processing Toolbox. This function increases the sampling rate of a signal by inserting (n-1) zeros between samples. The upsampled output has (n*input) samples. In addition, an initial phase can be specified and, thus, a delayed output of the input can be obtained by using this option.
43 <br>
44 <br>
45 <h2>Syntax</h2>
46 </p>
47 <div class="fragment"><pre>
48 <br>
49 b = upsample(a, pl)
50 </pre>
51 </div>
52 <h2>Parameters</h2>
53 <p>
54 The following parameters can be set in this method:
55 <ul>
56 <li> <tt>N</tt> - specify the desired upsample rate </li>
57 <li> <tt>phase</tt> - specify an initial phase range [0, N-1]</li>
58 </ul>
59 </p>
60 <p>
61 <h2>Examples</h2>
62 </p>
63 <p>
64 1. Upsampling a sequence of random data at original sampling rate of 1 Hz by a factor of 10 with no initial phase.
65 </p>
66 <div class="fragment"><pre>
67 <br>
68 pl = plist(<span class="string">'tsfcn'</span>, <span class="string">'randn(size(t))'</span>,<span class="string">'fs'</span>,1,<span class="string">'yunits'</span>,<span class="string">'m'</span>,<span class="string">'nsecs'</span>,100);
69 x = ao(pl);
70 pl_up = plist(<span class="string">'N'</span>, 10); <span class="comment">% increase the sampling frequency by a factor of 10</span>
71 y = upsample(x, pl_up); <span class="comment">% resample the input AO (x) to obtain the upsampled AO (y)</span>
72 iplot(x, y)
73 </pre>
74 </div>
75 </p>
76 <br>
77 <img src="images/upsample1.png" alt="Upsample" border="3">
78 <br>
79 <p>
80 2. Upsampling a sequence of random data at original sampling rate of 1 Hz by a factor of 21 with a phase of 20 samples.
81 </p>
82 <div class="fragment"><pre>
83 <br>
84 pl = plist(<span class="string">'tsfcn'</span>, <span class="string">'randn(size(t))'</span>,<span class="string">'fs'</span>,1,<span class="string">'yunits'</span>,<span class="string">'m'</span>,<span class="string">'nsecs'</span>,100);
85 x = ao(pl);
86 pl_upphase = plist(<span class="string">'N'</span>, 21,<span class=string>'phase'</span>, 20); <span class="comment">% increase the sampling frequency and add phase of 20 samples to upsampled data</span>
87 y = upsample(x, pl_upphase); <span class="comment">% resample the input AO (x) to obtain the upsampled and delayed AO (y)</span>
88 iplot(x, y)
89 </pre>
90 </div>
91 </p>
92 <br>
93 <img src="images/upsample2.png" alt="Upsample" border="3">
94
95 </p>
96
97 <br>
98 <br>
99 <table class="nav" summary="Navigation aid" border="0" width=
100 "100%" cellpadding="0" cellspacing="0">
101 <tr valign="top">
102 <td align="left" width="20"><a href="downsample.html"><img src=
103 "b_prev.gif" border="0" align="bottom" alt=
104 "Downsampling data"></a>&nbsp;</td>
105
106 <td align="left">Downsampling data</td>
107
108 <td>&nbsp;</td>
109
110 <td align="right">Resampling data</td>
111
112 <td align="right" width="20"><a href=
113 "resample.html"><img src="b_next.gif" border="0" align=
114 "bottom" alt="Resampling data"></a></td>
115 </tr>
116 </table><br>
117
118 <p class="copy">&copy;LTP Team</p>
119 </body>
120 </html>