フィルターのクリア

frequency of element in matrix

3 ビュー (過去 30 日間)
sumi
sumi 2014 年 3 月 19 日
コメント済み: sumi 2014 年 3 月 19 日
I want to count the frequency of each element in NxN matrix, meaning that i need to calculate how many times each elements appears on the the matrix.

回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 3 月 19 日
Sumi, use
[bincounts] = histc(reshape(a,1,N*N),min(min(a)):max(max(a)))
  2 件のコメント
sumi
sumi 2014 年 3 月 19 日
thank u...
sumi
sumi 2014 年 3 月 19 日
In Bimodality Detection algorithm has 2 steps below,.. Let P be the population. P is called a bimodal if it can be divided into two component sub-populations, say ( ) ( ) , s k g k P P such that: (a) s(k) P contains all the pixels with gray-level value £ some k, and g(k) P contains all the pixels with graylevel value > k. (b) The variances of s(k) P and g(k) P are small relative to the variance of P.
from that step frequency of image can be calculate using that code?...

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by