-1

histc私はすでにヒストグラムを持っていますが、後者の代わりに使用histして、ビンの中心値を取得したいと考えています。

次のコマンドを実行すると:

>> [h, bins] = histc(H)

次のエラーが表示されます。

??? Error using ==> histc
Not enough input arguments.

何故ですか?私は何をすべきか?

ありがとう。

4

1 に答える 1

0

変数のエッジを含める必要があります: (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 のようなものです。

于 2012-12-03T06:59:42.140 に答える