help in making a cumulative histogram, histc or accumarray?
조회 수: 3 (최근 30일)
이전 댓글 표시
All,
I have some data that I would like to create a cumulative histogram of. The bins I would like to use are like
bins=[0.2 15 0.4 15 0.6 15 0.8 15 1 15 1.2 15 1.4 15 1.6 15 1.8 15 2 15];
and a section of my data looks like
data = [0.072
0.085
0.118
0.200
0.325
0.527
0.823
1.193
1.553
1.822
1.952
1.907
1.707
1.468
1.287
1.200
1.138
1.038
0.898
0.778
0.667
0.599
0.563
0.511
0.434
0.356
0.300
0.266
0.247
0.216
0.199
0.183
0.165
0.131
0.081
0.058
0.051
0.037
0.022
0.019
0.032
0.034
0.034
0.034
0.033
0.020
0.017
0.016
0.017
0.017
0.003];
Given that the bins are non monotonically decreasing/increasing, accumarray and histc throw up errors, does anyone know how I might make this kind of cumulative histogram?
Thanks,
Jim
댓글 수: 0
채택된 답변
추가 답변 (1개)
Image Analyst
2012년 10월 24일
Why can't you just sort your bins and then pass them into histc. But you didn't specify if your bins were bin centers or bin edges.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!