Non-Persistent CSMA plotting of Graph

2 vues (au cours des 30 derniers jours)
Jirah Marie Navarro
Jirah Marie Navarro le 29 Mar 2020
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.

Réponses (1)

Jyotsna Talluri
Jyotsna Talluri le 31 Mar 2020
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));

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by