read file txt with strings and numbers
13 次查看(过去 30 天)
显示 更早的评论
blablabla
aaa 10 test 20
bbb 11 test1 21
ccc 12 test2 22
I have this data in a file .txt and I want to read the file.
I tried the following code but it is not working as I want to:
fid = fopen('test','r');
testData = fscanf(fid, '%s %d %s %d',[2 inf]);
fclose(fid);
0 个评论
采纳的回答
Star Strider
2023-9-11
2 个评论
Star Strider
2023-9-11
‘How I can skip it ?’
Consider using the 'HeaderLines' name-value pair with readtable.
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!