Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/ltpda_training_topic_1_7.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>Writing LTPDA scripts (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;"> </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 "ltpda_training_topic_1_6.html"><img src="b_prev.gif" border="0" align= | |
30 "bottom" alt="Constructing AOs from data files"></a> <a href= | |
31 "ltpda_training_topic_1_9.html"><img src="b_next.gif" border="0" align= | |
32 "bottom" alt="IFO/Temperature Example - Introduction"></a></td> | |
33 </tr> | |
34 </table> | |
35 | |
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Writing LTPDA scripts</h1> | |
37 <hr> | |
38 | |
39 <p> | |
40 <p> | |
41 Up to now, all the activity of the tutorial has been carried out on the MATLAB | |
42 command terminal. It is, of course, much more convenient to collect the commands | |
43 together in to a MATLAB script. In this sense, LTPDA scripting is just the same | |
44 as normal MATLAB scripting; just using LTPDA commands. | |
45 </p> | |
46 Here's an example script which makes two white-noise time-series and estimated the | |
47 power-spectral-density of each. | |
48 </p> | |
49 <div class="fragment"><pre> | |
50 <span class="comment">%% Make two test AOs</span> | |
51 | |
52 a1 = ao(plist(<span class="string">'tsfcn'</span>, <span class="string">'randn(size(t))'</span>, <span class="string">'fs'</span>, 10, <span class="string">'nsecs'</span>, 100)); | |
53 a2 = ao(plist(<span class="string">'tsfcn'</span>, <span class="string">'randn(size(t))'</span>, <span class="string">'fs'</span>, 10, <span class="string">'nsecs'</span>, 100)); | |
54 | |
55 <span class="comment">%% Make TFE</span> | |
56 | |
57 psds = psd(a1, a1); | |
58 a1xx = psds(1); | |
59 a2xx = psds(2); | |
60 | |
61 <span class="comment">% The following works!.</span> | |
62 b1xx = psd(a1); | |
63 b2xx = psd(a2); | |
64 | |
65 </pre></div> | |
66 <p> | |
67 You can explore the commands used to rebuild the object by using the <tt>type</tt> | |
68 method. Or you can plot the history as we did earlier. For example, try this command | |
69 for each of the cases above: | |
70 </p> | |
71 <div class="fragment"><pre> | |
72 type(a1xx) | |
73 type(b1xx) | |
74 </pre></div> | |
75 | |
76 | |
77 </p> | |
78 | |
79 <br> | |
80 <br> | |
81 <table class="nav" summary="Navigation aid" border="0" width= | |
82 "100%" cellpadding="0" cellspacing="0"> | |
83 <tr valign="top"> | |
84 <td align="left" width="20"><a href="ltpda_training_topic_1_6.html"><img src= | |
85 "b_prev.gif" border="0" align="bottom" alt= | |
86 "Constructing AOs from data files"></a> </td> | |
87 | |
88 <td align="left">Constructing AOs from data files</td> | |
89 | |
90 <td> </td> | |
91 | |
92 <td align="right">IFO/Temperature Example - Introduction</td> | |
93 | |
94 <td align="right" width="20"><a href= | |
95 "ltpda_training_topic_1_9.html"><img src="b_next.gif" border="0" align= | |
96 "bottom" alt="IFO/Temperature Example - Introduction"></a></td> | |
97 </tr> | |
98 </table><br> | |
99 | |
100 <p class="copy">©LTP Team</p> | |
101 </body> | |
102 </html> |