How to obtain CDF from large dataset?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a dataset of containing 10000 values.
I want to generate their CDF and want to plot them figure.
How can I do that?
This is the sample image.
![untitled.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247177/untitled.jpeg)
댓글 수: 0
답변 (1개)
Bjorn Gustavsson
2019년 11월 7일
Have a look at the help and documentation of the function ksdensity - that is one way to do this with the least amount of assumptions on the CDF.
HTH
댓글 수: 2
Bjorn Gustavsson
2019년 11월 7일
The problem with the "legend not working" you solve by calling ksdensity with output-parameters and plot yourself - that way you get the normal handles to the lines and legend will work fine.
The reason that "it is not working perfectly" sounds like you have too few points for ksdensity to estimate a smooth CDF - if you have too few points then you will not get as good an estimate...
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!