필터 지우기
필터 지우기

plotting a cdf over a histogram

조회 수: 26 (최근 30일)
John
John 2012년 3월 30일
Hello,
I've plotted a histogram of some data. Here it is http://dl.dropbox.com/u/54057365/All/departure%20time.JPG
How would I plot a cumulative distribution curve over the histogram? Also why is there gaps between the bars?
I'm trying to a achieve a graph like this
Many thanks
DepartureTimes = load('Departure Times (hr).txt')
h = hist(DepartureTimes,24);
h = h/sum(h);
bar(h, 'DisplayName', 'Depature Times');
legend('show');
xlim([5 25])

답변 (1개)

Thomas
Thomas 2012년 3월 30일
try
hold on
cdfplot(h)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by