PDP Log files into Octave Data files (conversion tools)
brought to you by
<-->
This page last updated 28th May 2003.
Octave, is a gnu based matlab program. It is usually referred to as
'a high-level interactive language for numerical computations'. By exporting
the PDP log data into octave you can use the statistical functions provided
by octave on these data vectors/matrices and also use gnuplot functions
to plot them visually. Gnuplot is a plotting/graphing utility incorporated
into octave. To read more about octave and to download it visit http://www.octave.org/doc/octave_toc.html.
For windows machines, kindly install octave within cygwin, as this will
be useful later in compiling the conversion tool set up as a C-wrapper
program and executing it. Presumably you must have cygwin installed to
run PDP in windows. For an faq and download options for octave on windows
visit http://octave.sourceforge.net/Octave_Windows.htm.
You will need:-
-
parsePDPlog.c
A wrapper program that takes as input the raw log file obtained from
a PDP run and the name of a file in which the octave-accessible data is
written. The option -h displays the help message. The program is written
in C and hence needs to be compiled before being executed. To compile the
program use the following command on linux or any unix machine
gcc -g -o parse parsePDPlog.c
You can do the same using the cc compiler instead of gcc. 'parse' in
the above example is the name of the executable this command will create,
you may replace it with anything you wish. 'parsePDPlog.c' is the name
of the C file you will download from the above link. In a windows machine
you can do the same using cygwin. There is an octave version for cygwin
http://octave.sourceforge.net/Octave_Windows.htm.
-
parsePDPlog.pl
The program calls on a perl executable parsePDPlog.pl to do the final
parsing. After this it opens the octave program. Octave has a text based
interaction, basically a different kind of shell, octave shell.
-
To execute the convertor: first download above two files - a C file
and a perl executable. Make sure the perl file is an executable(chmod +x
parsePDPlog.pl). Then compile the C file as described above. To execute
either use the -h option to see the help message or type the following
command:-
load <PDP log file> <octave data file>
The program will do the conversion and start an octave shell for you.
You will then type the following command in the octave shell prompt:-
load <converted pdp log file(octave data file)>
The name of the octave file to be loaded will be the name you gave
in as the second argument to the wrapper program. This will load the newly
converted PDP data onto Octave, from here on you may access the data using
the octave commands, such as plot, sum, etc.
-
Problems:-
Please contact punitha@cnbc.cmu.edu for any help or to report errors.