Finding frequency of values in an array

Hello all, I have a very basic problem. I have a long array (around a thousand cells long) and I need to graph the frequency of each unique number that appears in the array to achieve a Gaussian distribution. Is there any way to do this without using tabulate?
Thanks in advance.

 採用された回答

Birdman
Birdman 2018 年 1 月 8 日
編集済み: Birdman 2018 年 1 月 8 日

1 投票

Use histogram. For instance, simple approach:
V=randi([1 10],1,100);
histogram(V);xlabel('Numbers');ylabel('Frequency');

その他の回答 (0 件)

カテゴリ

質問済み:

2018 年 1 月 8 日

編集済み:

2018 年 1 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by