% Plot the c.d.f. of a random variable via simulation.

n=10^4
x=randn(1,n); % Standard normal random variable

stairs([min(x) sort(x)],0:1/length(x):1) % Plot the c.d.f of x