close all
C=exp(1);
ezplot(‘x/explot’,[0 C 0 1]),hold on
ezplot(‘x/exp(1)’,[0 C 0 1]),hold on
ezplot(‘log(x)’,[0 C 0 1])
axis([0 C 0 1])
N=10000
N =
10000
x=C*rand(1,N);y=rand(1,N);
idx=find(x>=C*y&x<=C.^y);
plot(x(idx),y(idx),’.’)
close all
C=exp(1);
ezplot(‘x/explot’,[0 C 0 1]),hold on
ezplot(‘x/exp(1)’,[0 C 0 1]),hold on
ezplot(‘log(x)’,[0 C 0 1])
axis([0 C 0 1])
N=10000
N =
10000
x=C*rand(1,N);y=rand(1,N);
idx=find(x>=C*y&x<=C.^y);
plot(x(idx),y(idx),’.’)