How do you recognize an empty line?
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi-
How do you recognize an empty line?
There is actual data after the blank line in the file
be shown below..
____________________________________
sada
sa
sd
◀ This is empty line
abc123
cde357
.
.
.
.
___________________________________
Thanks!
0 comentarios
Respuestas (2)
Marcel
el 8 de Nov. de 2022
Editada: Marcel
el 8 de Nov. de 2022
I think there are many ways to check this.
you can try to check in many ways. just take a look at the example below. be creative :p
code untested.
if line == "" |
line == " " |
isempty(line) == 1 |
strlength(line) == 0
% line was empty
end
0 comentarios
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!