필터 지우기
필터 지우기

text hiding inside the cover image

조회 수: 1 (최근 30일)
Sanjeeb Behera
Sanjeeb Behera 2016년 9월 14일
답변: Walter Roberson 2016년 10월 5일
I1 = logical(de2bi(uint8(hiddenstring)));
II = I8*128+I7*64+I6*32+I5*16+I4*8+I3*4+I2*2+I1;
??? Error using ==> plus
Matrix dimensions must agree.
Error in ==> Spatial_thesis at 28
II = I8*128+I7*64+I6*32+I5*16+I4*8+I3*4+I2*2+I1;
  댓글 수: 1
Adam
Adam 2016년 9월 14일
편집: Adam 2016년 9월 14일
We have no idea what most of the components in that statement are from what you have posted, but the error message clearly indicates that at least one of your variables is not of the same dimension as the rest. Using the debugger with a breakpoint should allow you to see very easily which one(s) this is.

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

답변 (2개)

Pritesh Shah
Pritesh Shah 2016년 10월 5일
After
I1 = logical(de2bi(uint8(hiddenstring)));
Please, check size of I1 to I7. Make sure that all must have same dimension.

Walter Roberson
Walter Roberson 2016년 10월 5일
de2bi defaults to outputting only as many bits wide as is required to hold the largest value it is passed. For text input that would typically be either 6 or 7 bits. Your other code probably assumed that de2bi was returning 8 bits.

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by