If you want a continuous distribution function, try this.
x = [1 2 3 3 4]
subplot(2,1,1)
ksdensity(x)
axis([-4 8 0 0.4])
subplot(2,1,2)
cdfplot(x)
grid off
axis([-4 8 0 1])
title('')
Which outputs this.

The Cumulative Distribution Function is on the bottom, the Kernel Density Estimate on the top.