how to get a cdf plot of my data

6 visualizzazioni (ultimi 30 giorni)
Sadiq Akbar
Sadiq Akbar il 18 Ott 2020
Commentato: Star Strider il 19 Ott 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.

Risposta accettata

Star Strider
Star Strider il 18 Ott 2020
Modificato: Star Strider il 18 Ott 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 Commenti
Sadiq Akbar
Sadiq Akbar il 19 Ott 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 il 19 Ott 2020
As always, my pleasure!

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by