How to convert a 1x 19 char to 4x5 char ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
bh dhouha
il 21 Mar 2015
Risposto: Star Strider
il 21 Mar 2015
How to convert a 1x 19 char to 4x5 char ?
0 Commenti
Risposta accettata
Star Strider
il 21 Mar 2015
You have to add a blank (or empty) character to do that.
For example, with a cell array:
a19 = strsplit(sprintf('%c ','a':'s')); % Create Cell Array
a20 = cat(2, a{1:19}, {''}); % Concatenate Empty Cell
A = reshape(a20, 4, 5); % Reshape To Get (4x5) Array
You didn’t post anything specific about what you’re doing, but some variation on this idea should give you the result you want.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Types 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!