1
$\begingroup$

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 : enter image description here

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 !

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

I think hist (histogram plot) or bar (bar graph) may do the job.

http://www.mathworks.co.uk/help/matlab/ref/bar.html

http://www.mathworks.co.uk/help/matlab/ref/hist.html

$\endgroup$
1
$\begingroup$

Matlab R2014b has this 'histogram' function which has the 'normalization' property, it may give what you want.

http://www.mathworks.com/help/matlab/ref/histogram.html#namevaluepairarguments

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.