필터 지우기
필터 지우기

convert a char array into a single char

조회 수: 5 (최근 30일)
aidan vickars
aidan vickars 2019년 3월 18일
답변: Pruthvi G 2019년 3월 18일
Basically I have a 360*4 char array full of letters, I need to convert it to a 31*40 char array. But the issue is the order matters. In the new array, the 1st row must be the first row of the old array followed by the second row of the old array followed by the third row of the old array and so on up to 40 characters for each row.
Any thoughs would be greatly appreciated.
  댓글 수: 1
KSSV
KSSV 2019년 3월 18일
Read about reshape. Else attach your data.

댓글을 달려면 로그인하십시오.

답변 (1개)

Pruthvi G
Pruthvi G 2019년 3월 18일
Please specify with an example.
You can use
Empty_chars = char(' '*char(ones(360,4)))
Reshaped = reshape(Empty_chars,36,40)
help reshape for mre info

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by