Effacer les filtres
Effacer les filtres

How to Search Blank Line ?

7 vues (au cours des 30 derniers jours)
dmfwlansejr
dmfwlansejr le 29 Mar 2023
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)

Réponses (1)

Walter Roberson
Walter Roberson le 29 Mar 2023
Assuming a cell array
line_is_blank = cellfun(@(S)isempty(strtrim(S)), YourCellArray)

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by