How to convert a 1x 19 char to 4x5 char ?
조회 수: 1 (최근 30일)
이전 댓글 표시
How to convert a 1x 19 char to 4x5 char ?
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!