필터 지우기
필터 지우기

how to plot the pdf of a random variable?

조회 수: 7 (최근 30일)
bsd
bsd 2011년 8월 5일
Dear sir/madam,
I need to plot the PDF (probability density function) of the uniform random variable or any other random variable for my lecture presentation. How could I do it in matlab? Looking forward for your reply.
Thanking you, BSD
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2011년 8월 5일
Looking forward to you accepting us.

댓글을 달려면 로그인하십시오.

채택된 답변

Daniel Shub
Daniel Shub 2011년 8월 5일
figure
x = -10:0.1:10;
x = -10:0.1:10; plot(x, unifpdf(x, 0,1))
You can of course change the range of x to suit your tastes and replace unif with the distribution of your choice.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by