How to deleted Enter char
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Xiaoning.Wang
le 27 Nov 2020
Commenté : Xiaoning.Wang
le 30 Nov 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 commentaires
Réponse acceptée
Walter Roberson
le 27 Nov 2020
a = regexprep(a, '[\r\n]', '')
or
a(ismember(a, [10 13])) = ''; %10 is newline, 13 is carriage return
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!