How to plot multiple CDF in one figure?

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.

답변 (1개)

Jalaj Gambhir
Jalaj Gambhir 2019년 11월 11일

0 개 추천

Hi,
You can easily use 'hold on' between each cdfplot for each dataset.
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:

카테고리

도움말 센터File Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

질문:

2019년 11월 6일

답변:

2019년 11월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by