How to define edges in hist3 function

10 次查看(过去 30 天)
Marin
Marin 2012-7-7
评论: Chris 2015-1-31
Hi, so I have some 2D data and I would like to make a histogram, I've seen that I can do that with hist3 function, but I would like to define edges for the bins, not just divide the data range into n bins of the same size. So I've made this code:
dD=(0:0.01:0.25);
diam=[1 2 3 4 5 10 15 20 30 40 50];
z=hist3([krateri_br(:,3) krateri_br(:,4)],'Edges',[diam dD]');
But every time I get an error:
??? Error using ==> hist3 at 132 Bin edges must be specified with a cell array containing two numeric vectors.__
Now, I've tried different combinations of parenthesis for edges vector, but nothing seems to work. I have a feeling that I'm making some elementary mistake, but cannot find it, so if someone knows how to solve this, please help.
Thank you in advance!
  5 个评论
Marin
Marin 2012-7-9
Oh, ok, that makes things a bit clearer. Thank you!

请先登录,再进行评论。

回答(0 个)

类别

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