how to get a cdf plot of my data

2 次查看(过去 30 天)
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.

采纳的回答

Star Strider
Star Strider 2020-10-18
编辑:Star Strider 2020-10-18
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 个评论
Sadiq Akbar
Sadiq Akbar 2020-10-19
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by