on a unix system:
STARTING_TIME = system("awk \"{if (NR == 1) print \\\$1}\" filename")
or
write a little program in the programming language of your choice
which returns the 1st word of the 1st line of a file and call it using the
'system' function.
or
temp = system ("cat filename")
STARTING_TIME = word(temp,1)
(replace 'cat' by e.g. 'type' on a dos/win system,
will not work for large files, because the whole data is written into a
variable)
or
temp = system ("head -n1 filename")
STARTING_TIME = word(temp,1)
Markus Eich wrote:
>
> Hi,
>
> for a plot I have in a datafile the time in ms stored in the first
> column. The time does not start from 0, but something like
> 1191342868.608249
> For the plot I just want to plot the relative elapsed time. What I want
> to do is to store the starting time in a variable STARTING_TIME and plot
> the date with a call like
>
> plot filename using ($1-STARTING_TIME):10 title "MOTCUR_M1" with lines
>
> How can I access this data field?
>
> Best,
>
> /Markus
>
>
> --
> Dipl. Inform. Markus Eich
> Research Assistant
> Robotics Lab at
> DFKI Bremen
> German Research Center for Artificial Intelligence
>
> Email: mar...@df...
> Tel.: +49 (421) 218-64105
> Fax : +49 (421) 218-64150
> Room: 212
>
> Postal address:
> DFKI Bremen
> Robotics Lab
> Markus Eich
> Robert-Hooke-Strasse 5
> 28359 Bremen
> Germany
>
> Further informations:
> http://www.dfki.de/robotics
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://www.nabble.com/Accessing-first-column%2C-first-row-tf4599273.html#a13135823
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|