CDF plot is not starting from zero in y axis and does not rest on 1.
조회 수: 4 (최근 30일)
이전 댓글 표시
I am calculating the energy efficiency (EE) of a wireless network and my values are very simillar as shown in code below. I want to plot the CDF curve for EE and make the following code.
w=[0 102.0100 103.560 105.3177 104.9670 104.9497 105.0100 105.1079 105.2866 104.9930 105.2124 105.1465 105.1701 105.0588 105.2687]
[F,X,Flo,Fup] = ecdf(w);
plot(X,F);
hold on;
curve :
The plot obtained by executing the code is not starting from zero in y axis and most of the values are lying between 104 to 106 and it is also not visible by this curve. I want the plot simillar to the curve attached. If any body have any idea please help me. Thanks you.
댓글 수: 3
Christopher Creutzig
2018년 12월 3일
Your data simply has a different shape than that example.
That said, the sample plot you listed uses logarithmic scaling on the x axis. Also, ecdf does not know where the range of observable values starts and places the 0 at the lowest value it sees. To get the 0 starting value further to the left, reassign its x coordinate:
w=[102.0100 103.560 105.3177 104.9670 104.9497 105.0100 105.1079 105.2866 104.9930 105.2124 105.1465 105.1701 105.0588 105.2687];
[F,X] = ecdf(w);
X(1) = 100;
plot(X,F);
set(gca,'XScale','log')
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!