% % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; clc; %mu = 1; data = exprnd(mu,1,1000); %a=1; b=1; data = gamrnd(a,b,1,1000); a=1; b=1; data = betarnd(a,b,1,1000); [N,h] = hist(data); figure; bar(h,N,1,'w'); title( 'frequency histogram' ); figure; bar(h,N/sum(N),1,'w'); title('relative frequence histogram'); figure; bar(h,N/(h(2)-h(1))/sum(N),1,'w'); title('density histogram');