how to convert a string into matrix of specified dimension
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
if string str='1,2,3,6,7,9,88,89,99' how it can be converted into a matrix as matrix=[1 2 3;6 7 9;88 89 99]
0 Commenti
Risposte (1)
KSSV
il 24 Ott 2016
str='1,2,3,6,7,9,88,89,99' ;
s = str2num(str) ;
matrix = reshape(s,3,[])'
0 Commenti
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!