![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247743/image.png)
How to plot multiple CDF in one figure?
조회 수: 13 (최근 30일)
이전 댓글 표시
Hello
I have 6 dataset. Each contains 10000 values.
I want to plot the CDF (Cumulative distribution function) of the dataset in a same figure in order to compare them.
I know that, total CDF will be 1 for each dataset.
How can I do that in MATLAB.
I am using cdfplot(dataset). But this is not working.
I am attaching a sample figure here.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247032/image.jpeg)
댓글 수: 0
답변 (1개)
Jalaj Gambhir
2019년 11월 11일
Hi,
For example:
load coastlines;
cdfplot(coastlat);
hold on;
cdfplot(coastlon);
Here the 'coastlat' and 'coastlon' are vectors of size 9865*1. And the output as:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/247743/image.png)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!