There's a few odd things going on here...
First, the valid range for j as used here is 1:4, not 1:5 for a 4x5 matrix.
As for the ii variable, did you mean to make a nested for-loop? By comparing x2(1:3) < 3, you will get a vector result hence why your code won't work with the more usual && operator. Perhaps you meant this:
any(x2(ii) < 4)
As for the result, it is written in a very confusing way that doesn't look at all like what you may have intended. Maybe if you explained what this code is trying to achieve in plain english, it would be easier to work out what you're doing wrong. =)
-g-
