How to plot a histogram after grouping the same values?

3 次查看(过去 30 天)
I have 2 rows.
id diff = 10 x 2 table
Var2 Var6
1 100
1 123
2 234
2 456
2 132
2 354
3 153
4 456
4 123
4 125
I want to draw a histogram by grouping 'Var2'.
According to the example above, there are 4 'Var2'. Therefore, there should be 4 histograms.
The code above is the code I used as an example.
Actually, in my data, there are 1 to 144 'Var2' and the number of 'Var6' is random. How do I plot a histogram for 144?

回答(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