# How to plot probability density function in MATLAB?

I'm trying to get a frequency plot, or PDF (probability density function) plot for my biometrics project in MATLAB. I have two vectors genuine_scores and impostor_scores, and I need to have a graph like:

x-axis : value of elements
y-axis : frequency of that value


So the graph should look like this :

I tried probplot() but it gives the cumulative distrubition function

I also tried normpdf(); but it does not make sense to me. Because I'm not interested in a mean value. I just need how frequent each of the value appears in the vector(s).

Thanks for any help !

• Have you tried stairs(x, y)? – Juan M. Bello-Rivas Mar 8 '14 at 19:03