フィルターのクリア

Number of lines in a txt file (empty lines computed)

1 回表示 (過去 30 日間)
Lila wagou
Lila wagou 2013 年 4 月 7 日
Dear all, how i got the number of all lines in a txt file: full and empty ones
Thanks lots

採用された回答

Ahmed A. Selman
Ahmed A. Selman 2013 年 4 月 7 日
Check this out:
E=textread('Your_File.txt','%s', 'delimiter', '\n');
% reads strings, white-space or delimiter-separated. Delete %s and use %d for
% numbers, %c for char, or %u for integers.
[a,b]=size(E);
% a has the number of lines, even empty ones.
  1 件のコメント
Lila wagou
Lila wagou 2013 年 4 月 7 日
Yah it is perfect, Thanks lots Mr Selman

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Analysis についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by