How to convert a 1x 19 char to 4x5 char ?

1 回表示 (過去 30 日間)
bh dhouha
bh dhouha 2015 年 3 月 21 日
回答済み: Star Strider 2015 年 3 月 21 日
How to convert a 1x 19 char to 4x5 char ?

採用された回答

Star Strider
Star Strider 2015 年 3 月 21 日
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 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by