Problem in convert cell to string.
Mostrar comentarios más antiguos
I have a cell show like this
% code
val =
title="
google
">
The value is 3*7 char. If I want to convert into string to be ---> title="google"> What can I do? I have found many solution but can't help for this one. Thank you.
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 7 de En. de 2015
S = reshape(A',1,[])
No reason to convert to and from a cell.
3 comentarios
Guillaume
el 7 de En. de 2015
Yes, there is, the extra spaces that cellstr trims. Your solution has an extra space after 'google' and a bunch of them after the closing '>'.
Sean de Wolski
el 7 de En. de 2015
Editada: Sean de Wolski
el 7 de En. de 2015
Ahh, I didn't realize cellstr implicitly calls deblank. Good to know!
Ara
el 7 de En. de 2015
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!