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));