0

speed200 歩の速度を含むという名前のベクトルがあります。

speed = [normrnd(80,2,100,1); normrnd(120,10,100,1)];

このベクトルは双峰分布に従います。

stepsは、各歩行の歩数を含む別のベクトルです。

a = 8;
b = 100;
steps = (b-a).*rand(200,1) + a;

速度の関数で実行されたステップのヒストグラム プロットを作成します。

binstep = 1.5;
binranges = (min(speed):binstep:max(speed)+binstep)';
[~, ind] = histc(speed, binranges);
bincounts = accumarray(ind, steps, size(binranges));
hFig = figure(); axh = axes('Parent', hFig); hold(axh, 'all'); grid(axh, 'on');
bar(axh, binranges, bincounts); axis(axh, 'tight');

今、私はしたいです

  1. バイモーダル分布をバープロットに当てはめます。
  2. バイモーダル分布 u1,u2,sigma1,sigma2, のパラメータを推定します。
  3. それが適切に適合しているかどうかを評価します (つまり、分布はバイモーダルです)。

手伝っていただけませんか?

4

1 に答える 1