histc
私はすでにヒストグラムを持っていますが、後者の代わりに使用hist
して、ビンの中心値を取得したいと考えています。
次のコマンドを実行すると:
>> [h, bins] = histc(H)
次のエラーが表示されます。
??? Error using ==> histc
Not enough input arguments.
何故ですか?私は何をすべきか?
ありがとう。
変数のエッジを含める必要があります: (Matlab ヘルプ):
N = histc(X,EDGES), for vector X, counts the number of values in X
that fall between the elements in the EDGES vector (which must contain
monotonically non-decreasing values). N is a LENGTH(EDGES) vector
containing these counts.
これは 2 つの長い配列である必要があります。つまり[2 4]
、上限と下限がそれぞれ 2 と 4 のようなものです。