How to draw an histogram?

How do I draw an histogram knowing the frequency of all the individual elements in a 150x150 matrix appears using matlab?

3 件のコメント

John D'Errico
John D'Errico 2024 年 4 月 4 日
編集済み: John D'Errico 2024 年 4 月 4 日
Please don't ask the same question a third time. That you still don't undertand what to do just means you need to prompt one of the many people who have already answered these duplicate questions for followup.
Prince
Prince 2024 年 4 月 4 日
Alright
DGM
DGM 2024 年 4 月 4 日
Given that my answer has already been provided, I see no reason to keep it or to keep this thread. Other mods are welcome to tidy up the others, but I'm just going to close this one.

回答 (1 件)

DGM
DGM 2024 年 4 月 4 日
編集済み: DGM 2024 年 4 月 4 日

1 投票

See histogram() and histcounts()
A = randn(150,150); % normally distributed random numbers
histogram(A) % looks like a gaussian to me
There are many different options, but I'm just using defaults here. If you have specific bin edges or a preferred method of calculating bin locations, see the documentation for details on how to set that up.

1 件のコメント

Prince
Prince 2024 年 4 月 4 日
Can you help me more details. I am still stucked.

この質問は閉じられています。

タグ

質問済み:

2024 年 4 月 4 日

閉鎖済み:

DGM
2024 年 4 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by