Read a .txt data file with and keep the last row of good data?
Ältere Kommentare anzeigen
Hello folks- I am trying to do some very simple data analysis of the experiment I am running. My experiment gives me a text file with rows of data, sometimes there is just one column but when it is capturing the good data there are two columns (first time always captured, second the measurement I am interested in)
This is what I want to do for example
0.0 0.1 0.2 3.23 0.3 0.4 5.21
I want to just save the two rows with the good data, is there an easy way to do this?
At the end goal here is to just get the last row, last column, or for instance that 5.21 is the number i want to capture.
1 Kommentar
Could you provide/attach a sample file? You say that you want the last two rows at one point and then that you want the two rows with good data.. the first statement means
0.3
0.4 5.21
and the second statement means
0.2 3.23
0.4 5.21
So which one is it? And if it is the first and there are good data on the last two rows, e.g.
0.0
0.1
0.2 3.23
0.3 10.82
0.4 5.21
do you need to get 10.82 and 5.21?
In case you can;t provide a sample file, is the line
0.4 5.21
the absolute last line in the file (meaning that there is nothing after)?
Antworten (0)
Kategorien
Mehr zu Data Import and Analysis finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!