Non-Persistent CSMA plotting of Graph

Hello,
I tried plotting a non-persistent graph but there's no output showing.
Here's the code:
G= 0:0.05:100;
a= 0.01;
NonPersistentCSMA= G.*(exp(-a*G))/(G*(1+2*a)+exp(-a*G));
plot(G,NonPersistentCSMA);
Kindly advise.

답변 (1개)

Jyotsna Talluri
Jyotsna Talluri 2020년 3월 31일

0 개 추천

From code ,I understand you are calculating the value of the expression G*(exp(-a*G))/(G*(1+2*a)+exp(-a*G)) for the values of G ranging from 0:0.05:100 and plotting the calculated values across the values of G. The multiplication and division operations should be element wise. For element wise division use './' operator
NonPersistentCSMA = G.*(exp(-a*G))./(G*(1+2*a)+exp(-a*G));

카테고리

도움말 센터File Exchange에서 Labels and Styling에 대해 자세히 알아보기

제품

릴리스

R2019b

질문:

2020년 3월 29일

답변:

2020년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by