comparison m-toolbox/html_help/help/ug/constructor_examples_cdata_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_cdata_content.html,v 1.2 2008/03/30 16:12:46 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_cdata.html#empty">Construct empty CDATA object</a>
12 </td>
13 </tr>
14 <tr>
15 <td>
16 <a href="constructor_examples_cdata.html#xml_file">Construct a CDATA object by loading the object from a file</a>
17 </td>
18 </tr>
19 <tr>
20 <td>
21 <a href="constructor_examples_cdata.html#plist">Construct a CDATA object from a parameter list object (PLIST)</a>
22 </td>
23 </tr>
24 <tr>
25 <td>
26 <a href="constructor_examples_cdata.html#const">Construct a CDATA from a constant data</a>
27 </td>
28 </tr>
29 </table>
30 <!-- --------------- Link box: end --------------- -->
31
32 <!-- --------------- NEXT EXAMPLE --------------- -->
33
34 <hr>
35 <h2 class="title"><a name="empty"></a>Construct empty CDATA object</h2>
36 <p>The following example creates a empty cdata object</p>
37 <div class="fragment"><pre class="programlisting">
38 c1 = cdata()
39 -------- cdata 01 ------------
40
41 name: None
42 y: [0x0], double
43 x:
44 ------------------------------
45 </pre></div>
46
47 <!-- --------------- NEXT EXAMPLE --------------- -->
48
49 <hr>
50 <h2 class="title"><a name="xml_file"></a>Construct a CDATA object by loading the object from a file</h2>
51 <p>The following example creates a new cdata object by loading the cdata object from disk.</p>
52 <div class="fragment"><pre class="programlisting">
53 c1 = cdata(<span class="string">'c1.mat'</span>)
54 c1 = cdata(<span class="string">'c1.xml'</span>)
55 </pre></div>
56
57 <!-- --------------- NEXT EXAMPLE --------------- -->
58
59 <hr>
60 <h2 class="title"><a name="plist"></a>Construct a CDATA object from a parameter list object (PLIST)</h2>
61
62 <p>Creates a data object with the given parameter list which contains 'fcn' or 'vals'</p>
63
64 <!-- --------------- 'fcn' --------------- -->
65
66 <h3 class="title"><a name="fcn">Use the key word 'fcn'</h3>
67 <p>The following example creates a CDATA object from the description of any valid MATLAB function.</p>
68 <div class="fragment"><pre class="programlisting">
69 pl = plist(<span class="string">'fcn'</span>, <span class="string">'randn(100,1)'</span>);
70
71 c1 = cdata(pl)
72 </pre></div>
73
74 <!-- --------------- 'vals' --------------- -->
75
76 <h3 class="title"><a name="vals">Use the key word 'vals'</h3>
77 <p>The following example creates a CDATA object with the values specified in 'vals'. Remark: the cdata object stores the values in the property 'y' so it is also possible to use the key-value 'y'</p>
78 <div class="fragment"><pre class="programlisting">
79 vals = [0 1 2 3; 5 6 7 8];
80 pl1 = plist(<span class="string">'vals'</span>, vals);
81 pl2 = plist(<span class="string">'y'</span>, vals);
82
83 c1 = cdata(pl1)
84 c2 = cdata(pl2)
85 </pre></div>
86
87 <!-- --------------- NEXT EXAMPLE --------------- -->
88
89 <hr>
90 <h2 class="title"><a name="const"></a>Construct a CDATA from a constant data</h2>
91 <div class="fragment"><pre class="programlisting">
92 c1 = cdata(1:.1:10)
93 c2 = cdata([1 2 3; 4 5 6; 7 8 9])
94 </pre></div>
95
96 <p>Construct a CDATA object with N samples all of the constant value</p>
97 <div class="fragment"><pre class="programlisting">
98 vals = 1:10;
99 N = 5;
100
101 c1 = cdata(N, vals)
102 </pre></div>
103
104
105 <!-- ------------------------------------------------ -->
106 <!-- --------------- END CONTENT FILE --------------- -->
107 <!-- ------------------------------------------------ -->