Convert string to a cell, array or matrix
Show older comments
Hi everyone,
I was wondering how I could convert an string to array or matrix.
Thanks very much.
Accepted Answer
More Answers (2)
Titus Edelhofer
on 27 Nov 2015
What about this one:
doc str2num
Titus
1 Comment
Alfonso Lopez
on 27 Nov 2015
Thorsten
on 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 Comments
Alfonso Lopez
on 27 Nov 2015
Thorsten
on 27 Nov 2015
Please post the data.xlsx file such that we can have a closer look.
Categories
Find more on Numeric Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!