Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Delete rows in a txt file
Replies: 2   Last Post: Aug 23, 2013 1:32 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Johan

Posts: 1
Registered: 8/23/13
Delete rows in a txt file
Posted: Aug 23, 2013 9:18 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a text file looking the following way:

1500rpm 50 bar

Cycle 1
X PCYL5 PCYL6 PCYL7 PCYL PCYL8
deg bar bar bar bar bar
-360.00 36.308 47.096 52.550 48.088 47.848
358.00 36.212 47.070 52.421 47.520 47.166
359.00 36.244 46.993 52.447 47.832 47.479
Cycle 2
X
-360.00 36.340 47.045 52.575 48.173 47.763
358.00 36.180 47.045 52.370 47.491 47.308
359.00 36.276 47.096 52.498 47.832 47.592
Cycle 3
X
-360.00 36.308 47.173 52.498 48.088 47.848

I want to remove all text making it look like this:

-360.00 36.308 47.096 52.550 48.088 47.848
358.00 36.212 47.070 52.421 47.520 47.166
359.00 36.244 46.993 52.447 47.832 47.479
-360.00 36.340 47.045 52.575 48.173 47.763
358.00 36.180 47.045 52.370 47.491 47.308
359.00 36.276 47.096 52.498 47.832 47.592
-360.00 36.308 47.173 52.498 48.088 47.848


Any suggestions on a script to do this?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.