MATLAB matrix replacement assignment gives error
Posted
by Gulcan
on Stack Overflow
See other posts from Stack Overflow
or by Gulcan
Published on 2010-03-07T19:39:40Z
Indexed on
2010/03/08
14:51 UTC
Read the original article
Hit count: 1197
I tried to update some part of a matrix, I got the following error message:
??? Assignment has fewer non-singleton rhs dimensions than non-singleton subscripts
My code tries to update some values of a matrix that represent a binary image. My code is as follows:
outImage(3:5,2:4,1) = max(imBinary(3:5,2:4,1));
When I delete last parameter (1), this time I get the same error. I guess there is a mismatch between dimensions but I could not get it. outImage is a new object that is created at that time (I tried to create it before, but nothing changed). What may be wrong?
© Stack Overflow or respective owner