Updated statistics chapter
This commit is contained in:
@@ -5,9 +5,6 @@ for i = [1:length(nrolls)]
|
||||
% plain hist:
|
||||
%hist(d)
|
||||
|
||||
% check bin counts of plain hist:
|
||||
% h = hist(d)
|
||||
|
||||
% force 6 bins:
|
||||
%hist(d, 6)
|
||||
|
||||
|
||||
@@ -13,14 +13,3 @@ bar(b2,h2, 'facecolor', 'r' )
|
||||
xlabel('x')
|
||||
ylabel('Frequency')
|
||||
hold off
|
||||
|
||||
% normalize:
|
||||
hn1 = h1/sum(h1)/db1;
|
||||
hn2 = h2/sum(h2)/db2;
|
||||
subplot( 1, 2, 2 )
|
||||
bar(b1,hn1)
|
||||
hold on
|
||||
bar(b2,hn2, 'facecolor', 'r' )
|
||||
xlabel('x')
|
||||
ylabel('Probability density')
|
||||
hold off
|
||||
|
||||
9
statistics/code/gaussianbinsnorm.m
Normal file
9
statistics/code/gaussianbinsnorm.m
Normal file
@@ -0,0 +1,9 @@
|
||||
hn1 = h1/sum(h1)/db1;
|
||||
hn2 = h2/sum(h2)/db2;
|
||||
subplot( 1, 2, 2 )
|
||||
bar(b1,hn1)
|
||||
hold on
|
||||
bar(b2,hn2, 'facecolor', 'r' )
|
||||
xlabel('x')
|
||||
ylabel('Probability density')
|
||||
hold off
|
||||
Reference in New Issue
Block a user