I have a big .txt file where I have numerical data and text. It begin with text "# Data from the experiment1" and three columns of numerical data (almost 1500 rows or even more) and then again text "# Data from the experiment2" followed with numerical data with several rows. This repeats several times (depends on how many experiments I have). I want to split the text file and save it as separate files named Exp1, Exp2…
What I am doing now is, open the file and find the last number in each section and use that number in the matlab code to split up the files. Is there any smarter way to split the files just by looking for the text begin with "# Data from" and split the textfile ?
Best Answer