Listing values that fall into histogram

2 ビュー (過去 30 日間)
iceskating911
iceskating911 2022 年 6 月 14 日
編集済み: iceskating911 2022 年 6 月 15 日
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 日
Yet again, see the optional third output argument from histcounts

サインインしてコメントする。

採用された回答

dpb
dpb 2022 年 6 月 14 日
edges = 2.^(-2:14);
[N,~,bin]=histcounts(Cell_Biomass_001,edges);
BinSums=groupsummary(Cell_Biomass_001,bin,'sum');

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by