MATLAB: 0x1 matrix getting while using find function

0x1 empty double matrix

Am getting 0x1 matrix while using find function to retreiv the indices,i have tried to use the max function in the array and then used find function still getting 0x1 empty double matrix error.Could you please help as when am using the same function to retriev the other indices am getting proper results

Best Answer

My best guess here, with the limited information you have given, is that you are trying to compare a number to one that is not exactly equal, due to floating point representation.
Take a look at this question/answer for more details.