Convert string to a cell, array or matrix
Ältere Kommentare anzeigen
Hi everyone,
I was wondering how I could convert an string to array or matrix.
Thanks very much.
Akzeptierte Antwort
Weitere Antworten (2)
Titus Edelhofer
am 27 Nov. 2015
What about this one:
doc str2num
Titus
1 Kommentar
Alfonso Lopez
am 27 Nov. 2015
Thorsten
am 27 Nov. 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 Kommentare
Alfonso Lopez
am 27 Nov. 2015
Thorsten
am 27 Nov. 2015
Please post the data.xlsx file such that we can have a closer look.
Kategorien
Mehr zu Numeric Types finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!