Load csv file with multi lines of headers in matlab 2012a

How to load a file like this in matlab2012a: ----------------------- Test Results as of 5/31/2013 Tester, ABC and DEF Tester,Result1, Result2 ABC, 1.2, 2.3 DEF, 0.5, 6.5 ABC, 4.5, 4.6 DEF, 3.3, 5.6 End of 5/31/2013 -----------------------
I need to store the date "5/31/2012" into a veriable and line 4 to line 8 to another.

1 Commento

Ken Atwell
Ken Atwell il 3 Giu 2013
Modificato: Ken Atwell il 3 Giu 2013
Cal, can you fix the carriage returns in your example? It is showing as just one long line, so I can't figure out where the line breaks should be.

Risposte (1)

I think the best way is to get the data. As is probably will be split by spaces, but you can also look for the first '\', then you know how many numbers after/before should be there.
data = importdata("C:\text.txt");

1 Commento

Is importdata available for 2012a? I just got upgraded from 2011a to 2012a and don't think I can get 2013a for a while.

Questa domanda è chiusa.

Tag

Richiesto:

Cai
il 31 Mag 2013

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by