I can't quite work out the code (maybe the formatting is confusing me), but it sounds like what you're trying to do is this:
A = magic(4)
y = (14:17)'
threshold = 13;
idx = any(A > threshold,2);
y(idx)
This selects the rows of A that contain any value greater than 13, then extracts those rows of the 4-element column vector y.
