How can i seperate numbers from strings while using textscan?
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Large Files and Big Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!