If dIx and dIy are matrices (as opposed to 1-D vectors), max(dIx)
and max(dIy)
will return vectors.
&&
and ||
should be used to compare scalars, not vectors.
You probably want to type
if max(dIx(:))<=103 && max(dIy(:))<=100
but I cannot tell for sure, as I dont know what the code is supposed to do :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…