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 commentaire

Ken Atwell
Ken Atwell le 3 Juin 2013
Modifié(e) : Ken Atwell le 3 Juin 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.

Réponses (1)

SpcCode
SpcCode le 31 Mai 2013

0 votes

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 commentaire

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

Cette question est clôturée.

Tags

Question posée :

Cai
le 31 Mai 2013

Clôturé :

le 20 Août 2021

Community Treasure Hunt

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

Start Hunting!

Translated by