image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

image Editing my data file Share It Thread Tools Search this Thread image
Old May6-09, 11:43 AM                  #1
omegacore

omegacore is Offline:
Posts: 15
Editing my data file

Hello!

I am running ubuntu, I have a copy of open office excel, but I need to edit a tab space delimited text file with my data in it so I can use gnuplot to plot it.

The editing consists of subtracting one column of data from a file, from another column of data in another file. Each row corresponds to another row in another document... There are about 1000 rows so I cannot do this manually. My lab writeup is due in a few hours, this is the last step I need to complete for the analysis!

I know there is a way to write a quick and dirty program that will perform the operation, but my experience with such things is limited to date. So please! Help!
  Reply With Quote
Old May6-09, 12:11 PM                  #2
mgb_phys

Physics Guru 2008

mgb_phys is Offline:
Posts: 7,290
Recognitions:
Homework Helper Homework Helper
Science Advisor Science Advisor
Re: Editing my data file

Look at awk (eg http://student.northpark.edu/pemente/awk/awk1line.txt) it's a very simple language for text processing

Print column 1 - column 2 would be something like:
awk '{print $1-$2}' datafile.txt
  Reply With Quote
image image
Reply

Tags
data editing, linux
Thread Tools


Similar Threads for: Editing my data file
Thread Thread Starter Forum Replies Last Post
MATLAB Data file question Saladsamurai Math & Science Software 3 Apr4-09 07:24 AM
Help Scanning File Data In C! NDiggity Engineering, Comp Sci, & Technology 1 Jan27-08 05:11 PM
Generating data file in matlab balogun Math & Science Software 4 Sep4-07 03:34 AM
MATLAB : how to get the data from a .fig file ??? serialtom Math & Science Software 1 Nov11-05 06:58 PM
Make a Pdf file into an ordinary web file (html file)? sobored Computing & Technology 3 Apr12-05 01:35 PM

Powered by vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image