Borrar filtros
Borrar filtros

delete a space blank in a cell array

8 visualizaciones (últimos 30 días)
Skander Marouani
Skander Marouani el 19 de Mzo. de 2018
Respondida: vijaya lakshmi el 22 de Mzo. de 2018
Hi everyone, i have this cell " MTA-M-001" and i when i'm comparing it with "MTA-M-001" i get a logical 0 so i want to get rid of the space blank

Respuesta aceptada

vijaya lakshmi
vijaya lakshmi el 22 de Mzo. de 2018
Hi Skander,
To remove leading and trailing spaces in string, refer strtrim
strtrim(" MTA-M-001")
Alternatively, if u storing it as char,then use
c=' MTA-M-001'
c=c(~isspace(c))

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by