How to Search Blank Line ?
5 ビュー (過去 30 日間)
古いコメントを表示
Hi- Everyone
I use 'isempty' to find an empty line.
But there is a problem
The left Side File, detect Line 4
The right file is undetectable. 'Isempty' can not be detected if there is a space
Is there any way to detect both cases?
(left file) (right file)

0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 3 月 29 日
Assuming a cell array
line_is_blank = cellfun(@(S)isempty(strtrim(S)), YourCellArray)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!