how to get a cdf plot of my data

5 Ansichten (letzte 30 Tage)
Sadiq Akbar
Sadiq Akbar am 18 Okt. 2020
Kommentiert: Star Strider am 19 Okt. 2020
I have run Flower Pollination Algorithm 100 times and have got readings of fitness values. The values of my fitness are as follows:
fitness=[
4.E+00
0.E+00
0.E+00
0.E+00
4.E+00
0.E+00
0.E+00
5.E-10
4.E+00
0.E+00
2.E-16
0.E+00
0.E+00
4.E+00
0.E+00
0.E+00
2.E-13
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
4.E+00
4.E-27
0.E+00
4.E+00
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
2.E-11
1.E-10
0.E+00
0.E+00
0.E+00
0.E+00
2.E-10
1.E-14
0.E+00
7.E-08
2.E-19
0.E+00
0.E+00
0.E+00
6.E-10
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
2.E-07
0.E+00
0.E+00
0.E+00
0.E+00
2.E-08
0.E+00
2.E-07
0.E+00
0.E+00
6.E-06
0.E+00
0.E+00
9.E-14
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
0.E+00
3.E-13
0.E+00
2.E-10
0.E+00
0.E+00
0.E+00
0.E+00
2.E-08
0.E+00
0.E+00
0.E+00
7.E-21
0.E+00
0.E+00
4.E-07
0.E+00
0.E+00
0.E+00
5.E-10
0.E+00
0.E+00
3.E-06
2.E-16
5.E-07
0.E+00 ];
How can I get its CDF plot.

Akzeptierte Antwort

Star Strider
Star Strider am 18 Okt. 2020
Bearbeitet: Star Strider am 18 Okt. 2020
Try this:
[f,x,flo,fup] = ecdf(fitness);
figure
loglog(x, f)
hold on
plot(x, [flo fup], '--r')
hold off
grid
legend('f', '95% CI', 'Location','SE')
xlabel('x')
ylabel('CDF')
The ecdf function calculates an empirical ciumulative distribution.
EDIT — (17 Oct 2020 at 3:35)
Added plot figure:
.
  19 Kommentare
Sadiq Akbar
Sadiq Akbar am 19 Okt. 2020
Ok dear Star Strider. Thank you very much for your so much help. Doesn't matter. I will float that problem. May be some other brother solves that.
I am indeed very thankful to you and @Ameer Hamza who also has also helped me alot like you. So thank you all. God bless you.
Star Strider
Star Strider am 19 Okt. 2020
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by