% eda03_08
% Compare the distribution p(d)=1 on 0<d<1
% with the distribution p(m)=0.5*m^(-0.5) on 0<m<1
% (which corresponds to the function m=d^2)

% setup a vector d
L=40;
Dd=1/L;
d=Dd*[1:L]';

% the distribution p(d) is constant
pd = ones(L,1);

% setup a vector m
L=40;
Dm=1/L;
m=Dm*[1:L]';

% m is a function of d
pm = 0.5*m.^(-0.5);

% use simple drawing function that encapsulates all the graphics
eda_draw(' ',pd,'caption p(d)',' ',pm,'caption p(m)');

