Skip to content

Instantly share code, notes, and snippets.

@erogol
Created October 1, 2013 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erogol/6785445 to your computer and use it in GitHub Desktop.
Save erogol/6785445 to your computer and use it in GitHub Desktop.
function [ res ] = ie505_hw1( n,a,b )
%İE505_HW1 Summary of this function goes here
% Detailed explanation goes here
[~,bins]= hist([a,b],1000);
r =unique( round( n*bins));
res = arrayfun(@(x)nchoosek(n,x)*double(1/(2^n)),r);
res = sum(res)
% [~,k] = hist([0,1],length(res));
% plot(res)
% [sigma, mu] = gaussfit(k,r);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment