Convert string to a cell, array or matrix
显示 更早的评论
Hi everyone,
I was wondering how I could convert an string to array or matrix.
Thanks very much.
采纳的回答
更多回答(2 个)
Thorsten
2015-11-27
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 个评论
Alfonso Lopez
2015-11-27
Thorsten
2015-11-27
Please post the data.xlsx file such that we can have a closer look.
类别
在 帮助中心 和 File Exchange 中查找有关 Numeric Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!