MATLAB: How to find max of an array avoiding the inf

infmax

I have an array of numbes in which some of them are inf. I want to find the largest number among non-inf numbers.
Any suggestion?

Best Answer

max(data(~isinf(data))