Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Split a file into multiple files using a pattern

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69677] Split a file into multiple files using a pattern
  • From: "Raj" <rajanikanth at gmail.com>
  • Date: Wed, 20 Sep 2006 02:44:48 -0400 (EDT)

hi!

COuld somebody please tell me how can I do this in Mathematica: I have
a file of numbers containing -999.99 in places where there is missing
data.
I want to split the file into a number of files based on the criterion
that the number of consecutive - 999.99 are more than 18 .

For example... if the file is of the form

{1,2,3,4,{-999.99 repeated 18 or more times},5,6,7,8}
then I want the output to be file1.txt which contains {1,2,3,4} and
file2.txt which contains {5,6,7,8}

Thanks,

Raj


  • Prev by Date: Re: Re: Why is the negative root?
  • Next by Date: Re: Inequalities
  • Previous by thread: Efficient arbitrary resampling of an array
  • Next by thread: Re: Split a file into multiple files using a pattern