how to plot cdf graph?

조회 수: 3 (최근 30일)
Meme
Meme 2014년 7월 19일
답변: dpb 2014년 7월 19일
If I have this code
Rateall=[];
distanceall=[];
for t=1:10
Rateall(end+1) = (1/2)*(log2(1+SINR1)+log2(1+SINR2));
distanceall(end+1)=pdist([randomclusters{1};randomclusters{2}],'euclidean');
end
Rateall has 10 values and distanceall has 10 values after the for loop. How to plot the cdf graph between both Rateall and distanceall?

답변 (1개)

dpb
dpb 2014년 7월 19일
"The Matlab way"...
Rateall= 0.5.*(log2(1+SINR1).+log2(1+SINR2));
distanceall=pdist([randomclusters{:,1};randomclusters{:,2}],'euclidean');
presuming SINR1 and 2 are vectors; otherwise and in your code you have only a constant and a single value for all results as there's nothing dependent on 'i' in the expression otherwise.
Similarly for the other with randomclusters

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by