How to distribute a vector in histogram in a loop ?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have loop that generates a vector x of different size each iteration.
I would like to just sum the values of the vector x that fall within certain boundaries,
How to do it easy?
For example for a x vector with values:
x = [ 1 10 11 20] changes length and values each iteration
I would like to distribute and sum their occurrence within bin let say from 0 to 50 in 5 bins/cells
1 2 1 0 0 occurrence
| | | | | |
0 10 20 30 40 50
And carry the summation further in the following iterations. I am interested just in the histogram of occurrences at the end of the loop.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!