필터 지우기
필터 지우기

how to convert character array to cell array

조회 수: 1 (최근 30일)
Jyothi Alugolu
Jyothi Alugolu 2017년 7월 25일
댓글: Jyothi Alugolu 2017년 7월 26일
hello, i have a char array of size 1280 * 8 ... values like 11111111 01010101 10100101 ........ 01010101 Now i want as 1*10240 cell array (since 1280 * 8 =10240)...output must be 1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,1.....i used str2num ..but they were being conatanated as vertical..i want to conctanate horizantally/..

채택된 답변

Stephen23
Stephen23 2017년 7월 25일
num2cell(reshape(X.',1,[]))
  댓글 수: 13
Stephen23
Stephen23 2017년 7월 25일
편집: Stephen23 2017년 7월 25일
reshape(C,[512,20]).'
Because MATLAB is column-major, so matrix vectorization goes along the columns first.
Jyothi Alugolu
Jyothi Alugolu 2017년 7월 26일
yeah ok..i got it..thank you soo much..

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by