A .* (A>5.5) makes zero all elements of A that are BELOW or EQUAL to 5.5 (because A>5.5 produces a size(A) matrix with 1 in place of elements > 5.5 and with zeros otherwise).
There are many ways to correct this: A .* ~(A > 5.5) or A .* (A <= 5.5) or even A(A > 5.5) = 0. The latter is the most clear, in my opinion.