필터 지우기
필터 지우기

Error :Index exceeds matrix dimensions

조회 수: 1 (최근 30일)
Evolution
Evolution 2012년 2월 1일
can someone please help me in finding the error in the code
I have a generated a key of 256 bytes I also read an image with its row and columns and dimensions and then i try to re-adjust my key accordingly so that i can perform bit wise exclusive XOR operation
[n m k] = size(ImgInp);
for ind = 1 : m
Fkey(:,ind) = key((1+(ind-1)*n) : (((ind-1)*n)+n));
end
Please let me know where i am making a mistake ?
THANKS

채택된 답변

Jan
Jan 2012년 2월 1일
(((ind-1)*n)+n) is the same as ind * n. If ind * n is greater than 256, the program fails. Currently we do not know the values of n,m,k.
you can use the debugger to check the values, when the program stops with an error:
dbstop if error
Do you know the buffer command?
  댓글 수: 1
Evolution
Evolution 2012년 2월 2일
thanks ,Quite useful reply.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by