How to read tab delimited .txt file line by line (File attached)?

4 次查看(过去 30 天)
Hello guys,
I want to read a txt file which has data line by line.
Please find the attached file (Data.txt).
Thanks

回答(1 个)

KSSV
KSSV 2021-10-6
fid = fopen('Data.txt');
tline = fgetl(fid);
while ischar(tline)
disp(tline)
tline = fgetl(fid);
end
fclose(fid);
  3 个评论
Vishnu Dhakad
Vishnu Dhakad 2021-10-6
编辑:Vishnu Dhakad 2021-10-6
Thanks for your promt response
I want Bin Diameter Limits data
"Bin Diameter Limits 180.00 182.15 184.33 186.54 188.78 191.06 193.36 195.71 198.08 200.50 202.95 205.43 207.95 210.51 213.11 215.75 218.42 221.14 223.90 226.70 229.54 232.43 235.36 238.34 241.36 244.43 247.55 250.71 253.93 257.19 260.51 263.88 267.30 270.77 274.31 277.89 281.54 285.24 289.00 292.82 296.71 300.66 304.67 308.74 312.88 317.09 321.37 325.72 330.14 334.63 339.19 343.84 348.55 353.35 358.22 363.18 368.22 373.34 378.55 383.84 389.23 394.70 400.27 405.93 411.68 417.54 423.49 429.54 435.70 441.96 448.32 454.80 461.38 468.08 474.89 481.82 488.87 496.04 503.33 510.75 518.29 525.97 533.78 541.72 549.80 558.02 566.38 574.89 583.55 592.36 601.32 610.43 619.71 629.14 638.75 648.52 658.46 668.57 678.87 689.34 700.00"

请先登录,再进行评论。

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by