Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/constructor_examples_fsdata_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_fsdata_content.html,v 1.3 2008/03/30 20:40:04 ingo Exp $ --> | |
2 | |
3 <!-- -------------------------------------------------- --> | |
4 <!-- --------------- BEGIN CONTENT FILE --------------- --> | |
5 <!-- -------------------------------------------------- --> | |
6 | |
7 <!-- --------------- Link box: begin --------------- --> | |
8 <table border="0" summary="Simple list" class="simplelist_nottable_last"> | |
9 <tr> | |
10 <td> | |
11 <a href="constructor_examples_fsdata.html#empty">Construct empty FSDATA object</a> | |
12 </td> | |
13 </tr> | |
14 <tr> | |
15 <td> | |
16 <a href="constructor_examples_fsdata.html#xml_file">Construct a FSDATA object by loading the object from a file</a> | |
17 </td> | |
18 </tr> | |
19 <tr> | |
20 <td> | |
21 <a href="constructor_examples_fsdata.html#data_vector">Construct a FSDATA object from a data vector</a> | |
22 </td> | |
23 </tr> | |
24 <tr> | |
25 <td> | |
26 <a href="constructor_examples_fsdata.html#data_freq_vector">Construct a FSDATA object from a data vector and frequency vector</a> | |
27 </td> | |
28 </tr> | |
29 <tr> | |
30 <td> | |
31 <a href="constructor_examples_fsdata.html#data_frequency">Construct a FSDATA object from a data vector and the corresponding frequency</a> | |
32 </td> | |
33 </tr> | |
34 <tr> | |
35 <td> | |
36 <a href="constructor_examples_fsdata.html#all">Construct a FSDATA object from a data vector, frequency vector and the corresponding frequency</a> | |
37 </td> | |
38 </tr> | |
39 </table> | |
40 <!-- --------------- Link box: end --------------- --> | |
41 | |
42 <!-- --------------- NEXT EXAMPLE --------------- --> | |
43 | |
44 <hr> | |
45 <h2 class="title"><a name="empty"></a>Construct empty FSDATA object</h2> | |
46 <p>The following example creates an empty fsdata object</p> | |
47 <div class="fragment"><pre class="programlisting"> | |
48 f1 = fsdata() | |
49 ----------- fsdata 01 ----------- | |
50 | |
51 name: None | |
52 fs: 0 | |
53 x: [0 0], double | |
54 y: [0 0], double | |
55 xunits: Hz | |
56 yunits: | |
57 --------------------------------- | |
58 </pre></div> | |
59 | |
60 <!-- --------------- NEXT EXAMPLE --------------- --> | |
61 | |
62 <hr> | |
63 <h2 class="title"><a name="xml_file"></a>Construct a FSDATA object by loading the object from a file</h2> | |
64 <p>The following example creates a new fsdata object by loading the fsdata object from disk.</p> | |
65 <div class="fragment"><pre class="programlisting"> | |
66 f1 = fsdata(<span class="string">'f1.mat'</span>) | |
67 f1 = fsdata(<span class="string">'f1.xml'</span>) | |
68 </pre></div> | |
69 | |
70 <!-- --------------- NEXT EXAMPLE --------------- --> | |
71 | |
72 <hr> | |
73 <h2 class="title"><a name="data_vector"></a>Construct a FSDATA object from a data vector</h2> | |
74 <p>creates a frequency-series object with the given y-data. Sample rate of the data is assumed to be 1Hz.</p> | |
75 <div class="fragment"><pre class="programlisting"> | |
76 y = randn(1000,1); | |
77 | |
78 f1 = fsdata(y) | |
79 </pre></div> | |
80 | |
81 <!-- --------------- NEXT EXAMPLE --------------- --> | |
82 | |
83 <hr> | |
84 <h2 class="title"><a name="data_freq_vector"></a>Construct a FSDATA object from a data vector and frequency vector</h2> | |
85 <p>creates a frequency-series object with the given (x,y)-data. The sample rate is then set as 2*x(end).</p> | |
86 <div class="fragment"><pre class="programlisting"> | |
87 fs = 10; | |
88 x = linspace(0, fs/2, 1000); | |
89 y = randn(1000,1); | |
90 | |
91 f1 = fsdata(x,y) | |
92 </pre></div> | |
93 | |
94 <!-- --------------- NEXT EXAMPLE --------------- --> | |
95 | |
96 <hr> | |
97 <h2 class="title"><a name="data_frequency"></a>Construct a FSDATA object from a data vector and the corresponding frequency</h2> | |
98 <p>creates a frequency-series object with the given y-data and sample rate. The frequency vector is grown assuming the first y sample corresponds to 0Hz and the last sample corresponds to the Nyquist frequency.</p> | |
99 <div class="fragment"><pre class="programlisting"> | |
100 y = randn(1000,1); | |
101 fs = 100; | |
102 | |
103 f1 = fsdata(y,fs) | |
104 </pre></div> | |
105 | |
106 <!-- --------------- NEXT EXAMPLE --------------- --> | |
107 | |
108 <hr> | |
109 <h2 class="title"><a name="all"></a>Construct a FSDATA object from a data vector, frequency vector and the corresponding frequency</h2> | |
110 <p>creates a frequency-series object with the given x,y-data and sample rate.</p> | |
111 <div class="fragment"><pre class="programlisting"> | |
112 fs = 10; | |
113 x = linspace(0, fs/2, 1000); | |
114 y = randn(1000,1); | |
115 | |
116 f1 = fsdata(x,y,fs); | |
117 </pre></div> | |
118 | |
119 <!-- ------------------------------------------------ --> | |
120 <!-- --------------- END CONTENT FILE --------------- --> | |
121 <!-- ------------------------------------------------ --> |