필터 지우기
필터 지우기

Error using reshape pls help me

조회 수: 1 (최근 30일)
nora elfiky
nora elfiky 2017년 4월 22일
댓글: Star Strider 2017년 4월 23일
appear this error how I can solve it Can you help me solve this problem? size MINO 1x524286
>>ppn=bin2dec(reshape(MINO,8,[]).')'; Error Product of known dimensions, 8, not divisible into total number of elements, 524286.

채택된 답변

Star Strider
Star Strider 2017년 4월 22일
One way to solve that is to zero-pad it with leading zeros:
MINO = rand(1,524286);
L8 = length(MINO)/8;
Ld = 8*ceil(L8);
MINO_reshaped = reshape([zeros(1, Ld-L8*8) MINO], 8, []);
  댓글 수: 2
nora elfiky
nora elfiky 2017년 4월 23일
thnx
Star Strider
Star Strider 2017년 4월 23일
My pleasure.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by