Number of lines in a txt file (empty lines computed)
조회 수: 3 (최근 30일)
이전 댓글 표시
Dear all, how i got the number of all lines in a txt file: full and empty ones
Thanks lots
댓글 수: 0
채택된 답변
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!