calculate the probability density function of Random variables

5 views (last 30 days)
hi there, i am trying to calculate the PDF of Radomvariables usig Matlab. i generate some randomvariables (1000 Values,Normal distributed) and use them to Calculate the Output of a Powerflow Problem. the Calculated Output will also got 1000 Values now i want to calculate the PDF of my Output and Plot it (to see how my Output is distributed). my Problem is how can i calculate the PDF if i don't know how my funktion is distributed.
thanks a lot for your Help

Answers (1)

Image Analyst
Image Analyst on 1 Sep 2015
Use histcounts(). Divide by the number of observations to normalize.
  4 Comments
h g
h g on 2 Sep 2015
i am using Matlab 2014a and there is no histcounts() function, can i use histc()? that means: if X is my Random Variable with 1000 numbers i have to write: bincounts=histc(X,1000)?? or how can i define the Binrange? thanks alot
Walter Roberson
Walter Roberson on 2 Sep 2015
You need to provide particular edges to histc, not the number of bins. hist() accepts the number of bins.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!