Note that the statement
is simply a confusing waste of time: It uses the operator for concatenating a list of elements  for one element only and assigns the output to the same variable as the input. 1. omit the unnecessary square brackets and 2. omit the complete line, when it does not perform anything.
The iterative growing of arrays consumes a lot of resources. If the final output contains 1000 rows, Matlab must allocate sum(1:1000) rows to create it: 500'500. A better implementation without a loop and without the iterative growing:
data = DATA(DATA(:, 2) == N, :)
The actual problem of the precision has been explained by Walter already. This might be useful:
match = abs(DATA(:, 2) - N) < 10 * eps(N);
data = DATA(match, :);
The limit might be absolute or relative depending on the meaning of your data. The factor 10 is chosen arbitrarily here also and has to be adjusted.