You need to be careful how you search for this element. Because of the way the colon operator works with floating point fractions, you cannot guarantee that values you think might obviously be in the vector are actually there exactly. E.g.,
Empty matrix: 1-by-0
So, for the -4.4 value the colon operator happen to pick the same "closest" IEEE double value that you get when you type the value at the command line. But this didn't happen for the -4.1 value. So to do these types of operations in your code, you need to account for this effect and either use tolerances or use some type of integer range that you know can be searched exactly.