CREATE HISTOGRAMM WITH A SPECIFIC NUMBER OF CLUSTERS IN X AXIS
1 回表示 (過去 30 日間)
古いコメントを表示
Hello,
I have a question about a code. I would like to create a histogramm with a specific number of clusters. For example I would like to create 5 clusters and based on this to create a histogramm with my data. I am uploading an .xlsx file. In first column (x axis data) I have dates and in second column I have results/numbers (y axis data). I would like from the data in first column to grouped in 5 clusters and finally to create a Histogramm.
Could you help me?
Thank you in advance.
0 件のコメント
回答 (1 件)
Sindar
2020 年 10 月 27 日
x = randn(1000,1);
nbins = 5;
h = histogram(x,nbins)
2 件のコメント
Sindar
2020 年 10 月 28 日
sounds like groupsummary is what you want. There's an example at that link for specifying grouping bins. It's easiest if your data is in a table (so, readtable from the xlsx file)
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!