Convert string to a cell, array or matrix
Mostrar comentarios más antiguos
Hi everyone,
I was wondering how I could convert an string to array or matrix.
Thanks very much.
Respuesta aceptada
Más respuestas (2)
Titus Edelhofer
el 27 de Nov. de 2015
What about this one:
doc str2num
Titus
1 comentario
Alfonso Lopez
el 27 de Nov. de 2015
Thorsten
el 27 de Nov. de 2015
A string is a 1Xn matrix of type char
S = 'hallo';
You can convert it to a numerical matrix using
M = double(S);
If that is not what you want, please give us more details, and a sample string.
2 comentarios
Alfonso Lopez
el 27 de Nov. de 2015
Thorsten
el 27 de Nov. de 2015
Please post the data.xlsx file such that we can have a closer look.
Categorías
Más información sobre Numeric Types 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!