필터 지우기
필터 지우기

how to plot probability density plot ?

조회 수: 4 (최근 30일)
SONI SONI
SONI SONI 2015년 2월 28일
댓글: Image Analyst 2017년 8월 19일
I have two dimensional array 1*120, I want to make probability density plot in. how to I plot in matlab?

답변 (1개)

Image Analyst
Image Analyst 2015년 2월 28일
How about calling hist() and bar() or plot()?
data = randn(1, 120)
[counts, binCenters] = hist(data, 16)
counts = counts / sum(counts); % Normalize
bar(binCenters, counts)
grid on;
  댓글 수: 2
ishita agrawal
ishita agrawal 2017년 8월 19일
Hey, I was looking for similar solution. It solved my problem. Thanks.
Image Analyst
Image Analyst 2017년 8월 19일
You're welcome. You can vote for answers if you want to "thank" the poster with reputation points. Now, with recent releases of MATLAB, we use histcounts() or histogram() instead of hist().

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

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by