Hello! I've been trying to figure out how to see all values that fall into a certain bin size. Right now, my code looks like the following for two double arrays because my initial goal was to sum the bins (sum the biomass of each cell size, where the edges of the bin represent cell size (0.5-1, 1-2, 2-4, etc)

댓글 수: 2

dpb
dpb 2022년 6월 14일
See histcounts -- the third optional argument returns bin of each observation.
dpb
dpb 2022년 6월 14일
Yet again, see the optional third output argument from histcounts

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

 채택된 답변

dpb
dpb 2022년 6월 14일

1 개 추천

edges = 2.^(-2:14);
[N,~,bin]=histcounts(Cell_Biomass_001,edges);
BinSums=groupsummary(Cell_Biomass_001,bin,'sum');

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

질문:

2022년 6월 14일

편집:

2022년 6월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by