필터 지우기
필터 지우기

convert binary array to different set array

조회 수: 1 (최근 30일)
Rick Giovanini
Rick Giovanini 2018년 1월 27일
답변: Star Strider 2018년 1월 28일
How could I convert something like
'111'
'010'
'101'
'111'
'110'
'110'
'101'
in a 7 by 3 array into the array of 7 bit elements
1110101
0111111
0110101

답변 (1개)

Star Strider
Star Strider 2018년 1월 28일
Try this:
C3 = ['111'
'010'
'101'
'111'
'110'
'110'
'101'];
C7 = reshape(C3', 7, [])';
C7 =
3×7 char array
'1110101'
'0111111'
'0110101'
Note the 2 transpose operators (') in the ‘C7’ assignment.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by