How to delete the first or the first two characters in a string?
196 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Philipp Mueller
el 15 de Mayo de 2020
Respondida: the cyclist
el 28 de Abr. de 2022
Hello,
How can i delete the first two characters of this string? Thank you
string='W987';
0 comentarios
Respuesta aceptada
Más respuestas (1)
the cyclist
el 28 de Abr. de 2022
@KSSV's answer is accurate in your case, but will not work on the string "W987". The following will work for either a character array or a string:
c = 'W987';
eraseBetween(c,1,2)
s = "W987";
eraseBetween(s,1,2)
0 comentarios
Ver también
Categorías
Más información sobre Characters and Strings 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!