A>5 creates a logical vector, with each entry being true if the corresponding A was (strictly) greater than 5, and false if the corresponding A was less than or equal to 5.
disp(A>5) would display that logical vector.
To display the contents of A where A > 5 you need to use A>5 to select entries out of A using logical indexing.
However... disp() does not return any value, and it is an error to attempt to assign disp() to a variable.
If you had assigned u the parts of A that are greater than 5, then u =  would just empty out that array, without changing A. You again want to use logical indexing
SomeArray(logical_mask) =