Physics307L F07:People/Mondragon/Poisson/Notebook/20071227

sample=poisson_rnd(lambda,50,numtrials); maxbin = max(max(sample)); minbin = min(min(sample)); fudge = minbin; bins=0:maxbins+fudge; for i=1:50 histsample(i,:) = hist(sample(i,:),bins); end Running bar(bins,histsample(1,:)) would plot a histogram bar graph of the "data" collected in the first "trial." [histx, histy] = bar(bins,histsample(1,:)) generates vectors histx and histy so that plot(histx,histy) results in the same plot as bar(bins,histsample(1,:)). Having vectors histx and histy on hand might prove useful later.
 * 1) number of trials = numtrails
 * 2) parameter lambda = lambda

for i=1:50 [histx(i,:), histy(i,:)] = bar(bins,histsample(i,:)) end