Using fgetl() to read lines

14 ビュー (過去 30 日間)
ZK 2013 年 1 月 10 日
How can I choose different line to read instead first line, using fgetl() formula?
Thank you.


Amith Kamath
Amith Kamath 2013 年 1 月 10 日 may be of some help. Unless you are constrained to using fgetl() for some reason,
C = textscan(fid, '%s','delimiter', '\n');
% Setup the line number in LineNum,
should do the trick.
  3 件のコメント
ZK 2013 年 1 月 11 日
Thank You I will remember that.


その他の回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 1 月 10 日
There is no method at the operating system level to position by line. The operating system itself uses fgetl() (or fgets()) to move forward by lines. MATLAB does not provide any "wrapper" over fgetl() to support skipping lines.


Community Treasure Hunt

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

Start Hunting!

Translated by