% % macm 202 -- 04 feb 03 -- djm % % w8cdf.m: simulate exponential transition process % % simulation cdf simu_sort = sort(simu_wait); simu_sum = (1:Nruns)'/Nruns; figure(3); clf plot(simu_sort,simu_sum,'.') hold on; plot(simu_sort,1-exp(-mu*simu_sort),'r') title('\bf edf of simulated transition times') xlabel('\bf time, t') ylabel('\bf p(transition in [0,t])') % random generation cdf rand_sort = sort(rand_wait); rand_sum = (1:Nruns)'/Nruns; figure(4); clf plot(rand_sort,rand_sum,'.') hold on; plot(rand_sort,1-exp(-mu*rand_sort),'r') title('\bf edf of randomly generated transition times') xlabel('\bf time, t') ylabel('\bf p(transition in [0,t])')