??? Index exceeds matrix dimensions.
3 views (last 30 days)
Show older comments
I think I have a problem with my matrices but I can't figure out where to fix it. The code that I have written is:
??? Index exceeds matrix dimensions.
Error in ==> dctwatermark at 75 dct_block=dct2(cover_object(y:y+blocksize-1,x:x+blocksize-1));
2 Comments
Accepted Answer
Walter Roberson
on 21 May 2013
I speculate that your cover_object is not a multiple of blocksize in one (or both) directions, and your code only testing whether the x or y starts in the object instead of testing whether the end would also be in the object.
1 Comment
Walter Roberson
on 21 May 2013
At the MATLAB command line give the command
dbstop if error
and run the program. When it stops, examine x and y and blocksize and size(cover_obj)
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!