Here we will use the it_file class to store some data. The program write_it_file.cpp looks as follows:
When you run this program you will obtain a file called it_file_test.it in your current directory. You can read the file into Matlab/Octave to view the data by using the following commands:
Note: Make sure that $PREFIX/share/itpp is in your Matlab/Octave path and that you run the code above from the directory where it_file_test.it is located ($PREFIX is the IT++ installation prefix; /usr/local by default).
The IT++ program read_it_file.cpp that reads the file and prints its content can look like this:
Here is the output of the program:
a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20]
Generated on Sat May 25 2013 16:32:26 for IT++ by Doxygen 1.8.2