How to deleted Enter char
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Xiaoning.Wang
el 27 de Nov. de 2020
Comentada: Xiaoning.Wang
el 30 de Nov. de 2020
a = '
'MOVABLE,ERASABLE,
MERGEABLE'
a(18) = '
' % there hava a Enter char
I want to delete the Enter Char.
the way ('\n' or 'r' or '\r\n' ) is error. so how to delete the Enter char
0 comentarios
Respuesta aceptada
Walter Roberson
el 27 de Nov. de 2020
a = regexprep(a, '[\r\n]', '')
or
a(ismember(a, [10 13])) = ''; %10 is newline, 13 is carriage return
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays 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!