If I have a matrix A, and I want to plot its probability distribution in a histogram I use:
>> A = [NaN Inf 10 20] >> histogram(A,'Normalization','probability')
However, what I get is a probability of 0.25 percent for "10" and of 0.25 percent for "20". This is because histogram counts NaN and Inf as elements so there are 4 total elements. But I want to ignore missing entries in the total number of elements.
Is there an option of the function "histogram" that allows me to exclude non-numerical values?
Best Answer