how to get a cdf plot of my data

7 visualizaciones (últimos 30 días)
Sadiq Akbar
Sadiq Akbar el 18 de Oct. de 2020
Comentada: Star Strider el 19 de Oct. de 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.

Respuesta aceptada

Star Strider
Star Strider el 18 de Oct. de 2020
Editada: Star Strider el 18 de Oct. de 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 comentarios
Sadiq Akbar
Sadiq Akbar el 19 de Oct. de 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 el 19 de Oct. de 2020
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by