x = [1 2 3 3 4] cdfplot(x)
After Googling, I find the above code will draw a cumulative distribution function for me in Matlab. Is there a simp
type "ksdensity" in matlab help and you will find out the function that will give you the continuous form of PDF. I guess this is exactly what you are looking for.