How can i seperate numbers from strings while using textscan?
Ältere Kommentare anzeigen
I want to store this data in a cell using textscan:
2000,146.557,OE,-300,150
2000,146.625,FOB,0,0
My code is
fidT=fopen('test.txt');
dataT=textscan(fidT,'%d,%f,%s,%d,%d');
But matlab handles "OE,-300,150" as one string. I want matlab to handle it as 1 string, followed by 2 numbers. How can I do that?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Large Files and Big Data finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!