speed
200 歩の速度を含むという名前のベクトルがあります。
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');
今、私はしたいです
- バイモーダル分布をバープロットに当てはめます。
- バイモーダル分布 u1,u2,sigma1,sigma2, のパラメータを推定します。
- それが適切に適合しているかどうかを評価します (つまり、分布はバイモーダルです)。
手伝っていただけませんか?