Changeset 354 for doc/html/itfile.html
- Timestamp:
- 06/02/09 10:24:26 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
doc/html/itfile.html
r353 r354 62 62 <div class="contents"> 63 63 <h1><a class="anchor" name="itfile">Writing and reading data from files </a></h1>Here we will use the <code>it_file</code> class to store some data. The program <code>write_it_file.cpp</code> looks as follows:<p> 64 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include < <a class="code" href="itcomm_8h.html" title="Include file for the IT++ communications module.">itpp/itcomm.h</a>></span>64 <div class="fragment"><pre class="fragment"><span class="preprocessor">#include <itpp/itcomm.h></span> 65 65 66 66 <span class="keyword">using namespace </span>itpp; … … 72 72 73 73 <span class="comment">// Open a file with the name "it_file_test.it"</span> 74 ff. <a class="code" href="classitpp_1_1it__file.html#549f27e6830fa68fc964041b79733168" title="Open a file for reading and writing.">open</a>(<span class="stringliteral">"it_file_test.it"</span>);74 ff.open(<span class="stringliteral">"it_file_test.it"</span>); 75 75 76 76 <span class="comment">// Create some data to put into the file</span> 77 vec a = <a class="code" href="group__specmat.html#ge5632baa525e231b015f3d45f3503cac" title="Linspace (works in the same way as the matlab version).">linspace</a>(1, 20, 20);77 vec a = linspace(1, 20, 20); 78 78 79 79 <span class="comment">// Put the variable a into the file. The Name("a") tells the file class</span> … … 105 105 a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] 106 106 </pre></div> </div> 107 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10: 02:142009 for mixpp by 107 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:11:00 2009 for mixpp by 108 108 <a href="http://www.doxygen.org/index.html"> 109 109 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>