HOW I CAN REMOVE THE SPACE

1 visualización (últimos 30 días)
ahmad abusara
ahmad abusara el 23 de Jun. de 2019
Respondida: Walter Roberson el 23 de Jun. de 2019
how i can remove the spacing from strings like this
i have this string ( STEP NOT OF PETS ) and i want it to be like this ( STEPNOTOFPETS )
  2 comentarios
Walter Roberson
Walter Roberson el 23 de Jun. de 2019
Character vector? Or string() object?
ahmad abusara
ahmad abusara el 23 de Jun. de 2019
Character vector

Iniciar sesión para comentar.

Respuestas (2)

madhan ravi
madhan ravi el 23 de Jun. de 2019
regexprep(yourstring,' ','')
  1 comentario
madhan ravi
madhan ravi el 23 de Jun. de 2019
Also you could use strrep() in place of regexprep().

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 23 de Jun. de 2019
yourstring(yourstring == ' ') = '' ;

Categorías

Más información sobre Cell Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by