How can i seperate numbers from strings while using textscan?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!